Coder Social home page Coder Social logo

Delete images / files from S3 about next-s3-upload HOT 6 OPEN

ryanto avatar ryanto commented on August 18, 2024 2
Delete images / files from S3

from next-s3-upload.

Comments (6)

ryanto avatar ryanto commented on August 18, 2024 4

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.

ssoronid avatar ssoronid commented on August 18, 2024 1

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

from next-s3-upload.

ryanto avatar ryanto commented on August 18, 2024 1

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

masnwilliams avatar masnwilliams commented on August 18, 2024

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.

makivlach avatar makivlach commented on August 18, 2024

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

iukea1 avatar iukea1 commented on August 18, 2024

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.