DEV Community

ADEKOLA Abdwahab
ADEKOLA Abdwahab

Posted on

How would you handle image upload?

User uploads profile picture.

Images are converted into URLs via third party asset storage.

Backend handles the conversion.

Which of the scenarios below would you adopt and why?

A. Frontend should call convertImageToUrl endpoint, then call updateprofilepicture endpoint with the image url.

B. Frontend should call updateprofilepicture endpoint with the raw image - so backend handles the conversion to url in that endpoint implementation.

What are your reasons?

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay