Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove image from cloudinary #26

Open
harshmangalam opened this issue Oct 2, 2022 · 13 comments
Open

Remove image from cloudinary #26

harshmangalam opened this issue Oct 2, 2022 · 13 comments
Labels
bug Something isn't working hacktoberfest

Comments

@harshmangalam
Copy link
Owner

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 harshmangalam added bug Something isn't working hacktoberfest labels Oct 2, 2022
@himan17
Copy link

himan17 commented Oct 2, 2022

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

@harshmangalam
Copy link
Owner Author

Sure , you can continue

@utkarsh4321
Copy link

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

@harshmangalam
Copy link
Owner Author

Make PR i will merge

@utkarsh4321
Copy link

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

@utkarsh4321
Copy link

utkarsh4321 commented Oct 16, 2022

@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
Copy link
Contributor

@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
Copy link
Owner Author

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

@harshmangalam
Copy link
Owner Author

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

@harshmangalam
Copy link
Owner Author

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
Copy link

Ok i will try @harshmangalam

@utkarsh4321
Copy link

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

@harshmangalam
Copy link
Owner Author

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest
Projects
None yet
Development

No branches or pull requests

4 participants