How would you do to exchange file through REST API ?

Valentin - Sep 26 - - Dev Community

Hey guys !

I'm looking for good practice from the community.

I'm developping a REST API and I sometime need to upload/download files.
What would be the best practice to you ?

Solution 1 : Sending a link to a ressource accessible publicly and let the client download it ?

Solution 2 : Send file through base64 value ?

Solution 3 : ???

Thank you !

. .
Terabox Video Player