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

Delete images / files from S3 #62

Open
p-christ opened this issue Mar 24, 2022 · 6 comments
Open

Delete images / files from S3 #62

p-christ opened this issue Mar 24, 2022 · 6 comments
Labels
documentation Improvements or additions to documentation

Comments

@p-christ
Copy link

hi, this repo is amazing!! Really great job, it's so helpful for us... I wanted to ask if you could add the possibility to delete things from s3 aswell as upload?

@masnwilliams
Copy link

I think this would be a great enhancement to this project. It seems like it was already set up to do this as it has a useS3Upload hook and could probably easily implement a useS3Delete hook.

@ryanto
Copy link
Owner

ryanto commented Apr 4, 2022

Thanks for opening an issue.

This feature gets asked about a lot. It's hard for this library to safely provide a delete hook because you could end up in a situation where one user starts deleting another user's uploads. I think most people using this library are going to want some sort of auth around deletes.

That said this gets asked about all the time, so I think the first step is some documentation showing people how to setup their own API route that can delete files.

@ryanto ryanto added the documentation Improvements or additions to documentation label Apr 4, 2022
@ssoronid
Copy link

Any news on this delete function? Would be great a way to implement / hack to make it possible..

@makivlach
Copy link

makivlach commented Jan 12, 2023

... I think most people using this library are going to want some sort of auth around deletes.

@ryanto That is out of the scope of this lib, no? Such an authorization mechanism should be handled on the auth layer of the target app.

I wanted to fork this package and add such functionality, but when inspecting the code, I noticed that it has hardcoded stuff (on the server side) to do just the upload.

Since it seems like more work to redo that part - I've decided to use this instead: https://www.npmjs.com/package/s3-node

@ryanto
Copy link
Owner

ryanto commented Jan 12, 2023

@makivlach Yup! Auth is out of scope for this lib. You if you need full control over your deletes you're better off sticking with this library for uploads and using a server side library like the one you mentioned or the AWS SDK for deletes.

@iukea1
Copy link

iukea1 commented Jul 26, 2023

@makivlach Yup! Auth is out of scope for this lib. You if you need full control over your deletes you're better off sticking with this library for uploads and using a server side library like the one you mentioned or the AWS SDK for deletes.

Thanks for this library and your advice on handling auth to the bucket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

6 participants