DEV Community

Uploading images to Cloudinary with a React app.

Maaruf Dauda on January 31, 2020

Hi there. This year, I decided to write at least four technical articles a month. That's at least one per week.  If I stick with this all throug...
Collapse
 
sajaswalgah profile image
SajaSwalgah

when refreshing the page the uploaded photos disappear, how can i solve this problem

Collapse
 
mmichaud3 profile image
mmichaud3

ever come up with a solution for this?

Collapse
 
alextrandafir profile image
alex-trandafir

You need to save the id in a state probably

Collapse
 
emkaydauda profile image
Maaruf Dauda

Hi Saga,

I'm not sure why this would happen, but can you confirm that you have a useEffect call that fetches the images?

Collapse
 
ogheneovo12 profile image
ogheneovo12

yeah, but the fetch functions are being called, but the urlpath generated is wrong, returns 404

Collapse
 
ogheneovo12 profile image
ogheneovo12

hey nice article, it was very helpful, but I have got a minor issue, is there a way I can hook into the upload process, have the image temporarily held then when a certain condition is meant, I complete the upload, if not abort.

Collapse
 
jordantredaniel profile image
Jordan Christley • Edited

Great post! You should change your title to get more exposure though, bc you do MUCH MORE than just upload :)

Collapse
 
alextrandafir profile image
alex-trandafir

I was just looking for a quick plug&play cloudinary widget for a react + nexjs app and this was very helpful :)

Collapse
 
emkaydauda profile image
Maaruf Dauda

Hi Alex,

Glad to hear the article helped. Thank you :)

Collapse
 
smitarath profile image
SmitaRath • Edited

Even if I am uploading multiple images, only one image would show up on my application. Do I have to modify something to retrieve all the images which I have uploaded.

Collapse
 
r4vr4n profile image
Rajeev Ranjan

This is exactly what i was looking for . thanks a lot man.