How upload images or pdf file in my droplet storage?

I have a React app + express hosted in a Droplet. I want to allow my users to upload some pictures, save this pictures in my droplet and get a sort of reference to be able to show this picture where I want.

For example a user wants to write a news article, they upload a picture to show in the article… and then once the user upload the picture, from the JAVASCRIPT point of view…, how can I save this picture from my react front end to digital ocean? and then how can I get back a reference of that image to show it in the news article?



Hi Vana, I’m having the exact question as yours. it sounds like you have not been fully answered by this thread. I believe you have solved the problem. Can you please share your solution?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Hey friend,

Great question. I found a tutorial that may be helpful:

For your purposes, it may help matters to consider this not specific to DigitalOcean. For example, this question:

“how can I save this picture from my react front end to digital ocean”

Would be better phrased as:

“how can I save this picture from my react front end to a Linux file system”

This extracts specific detail and replaces it with the generic one, because while the problem may have been solved in the generic fashion, there may be less information available about it that specifies DigitalOcean (which, in this case, is an interchangeable variable of no consequence).

Hope that helps :)