harshmangalam / hydrogen-solidjs-client

A social media web app powered by SolidJS
GNU General Public License v3.0
84 stars 61 forks source link

Remove image from cloudinary #26

Open harshmangalam opened 2 years ago

harshmangalam commented 2 years ago

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

himan17 commented 2 years ago

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

harshmangalam commented 2 years ago

Sure , you can continue

utkarsh4321 commented 2 years ago

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

harshmangalam commented 2 years ago

Make PR i will merge

utkarsh4321 commented 2 years ago

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

utkarsh4321 commented 2 years ago

@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.

chrisli-03 commented 2 years ago

@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

harshmangalam commented 2 years ago

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

harshmangalam commented 2 years ago

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

harshmangalam commented 2 years ago

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.

utkarsh4321 commented 2 years ago

Ok i will try @harshmangalam

utkarsh4321 commented 2 years ago

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

harshmangalam commented 2 years ago

Yes