Comments (6)
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.
from next-s3-upload.
Any news on this delete function? Would be great a way to implement / hack to make it possible..
from next-s3-upload.
@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.
from next-s3-upload.
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.
from next-s3-upload.
... 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
from next-s3-upload.
@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
from next-s3-upload.
Related Issues (20)
- Method not allowed. HOT 1
- Require is not defined for aws-sdk on Next HOT 1
- Upload fails with 200 OK but error failed to fetch HOT 10
- How to catch server error?
- Region is missing error HOT 4
- next13 app dir support? HOT 6
- Issue With Digital Ocean Spaces HOT 6
- CORS Config for non AWS HOSTs HOT 2
- Flagging need for dynamic bucket names & regions
- Add custom endpoint with App router HOT 4
- TypeError: Body is unusable HOT 8
- Object tags
- MalformedXML: The XML you provided was not well-formed or did not validate against our published schema
- How to enable transfer acceleration?
- Custom Path for File Uploads with App Router HOT 3
- New Feature Request - Increase Time Limit For Pre-signed URL
- Does this library implement multipart?
- AccessDenied, USER is not authorized to perform: sts:GetFederationToken on resource:
- Can I use this for cloudflare R2 HOT 2
- Setting App router for digital ocean space HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next-s3-upload.