hydrogen-solidjs-client icon indicating copy to clipboard operation
hydrogen-solidjs-client copied to clipboard

Remove image from cloudinary

Open harshmangalam opened this issue 3 years ago • 13 comments

Image component is a shared component that is used by profile pic upload screen, post create screen etc... Now when image upload it create blob and show the preview at same time when image successfully uploaded to cloudinary then cloudinary url added to image preview and blob destroyed. But suppose if someone remove image then it only remove from the state it should also remove that image from cloudinary.

Make DELETE api call to /cloudinary/:public_id when someone remove image during preview. public_id you can get during image uploaded to cloudinary

harshmangalam avatar Oct 02 '22 02:10 harshmangalam

Hey Harsh, I have previously worked with cloudinary, I can give it a try!

himan17 avatar Oct 02 '22 03:10 himan17

Sure , you can continue

harshmangalam avatar Oct 02 '22 03:10 harshmangalam

@harshmangalam Hii can you assign it to me? I want to work on it.

utkarsh4321 avatar Oct 09 '22 07:10 utkarsh4321

Make PR i will merge

harshmangalam avatar Oct 09 '22 12:10 harshmangalam

can you suggest something on how I will start? explain me little bit about it

utkarsh4321 avatar Oct 09 '22 13:10 utkarsh4321

@harshmangalam any update please update me on how I will start. Like there is no backend-related stuff present in your repo. I m waiting for your response. I really wanted to do this please tell me.

utkarsh4321 avatar Oct 16 '22 03:10 utkarsh4321

@harshmangalam any update please update me on how I will start. Like there is no backend-related stuff present in your repo. I m waiting for your response. I really wanted to do this please tell me.

its in readme, create a .env file, add VITE_ENDPOINT=https://hydrogen-harsh.herokuapp.com/api to it

chrisli-03 avatar Oct 19 '22 13:10 chrisli-03

Backend is available on another repo https://github.com/harshmangalam/hydrogen-nodejs-server

harshmangalam avatar Oct 20 '22 03:10 harshmangalam

But you can use this https://hydrogen-harsh.herokuapp.com/api url to access backend api

harshmangalam avatar Oct 20 '22 03:10 harshmangalam

When someone click on delete image button of preview image Make an api DELETE call to /cloudinary/:public_id path to delete image from cloudinary. public_id is available when some image will be upload.

harshmangalam avatar Oct 20 '22 03:10 harshmangalam

Ok i will try @harshmangalam

utkarsh4321 avatar Oct 21 '22 00:10 utkarsh4321

Hii @harshmangalam so this is front-end work only i need to call that API with /cloudinary/:public_id

utkarsh4321 avatar Oct 25 '22 16:10 utkarsh4321

Yes

harshmangalam avatar Oct 26 '22 02:10 harshmangalam