DEV Community

Valentin
Valentin

Posted on

How would you do to exchange file through REST API ?

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 !

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay