Giter Site home page Giter Site logo

Comments (3)

OriginalEXE avatar OriginalEXE commented on July 24, 2024

Hi,

you can access the details of the uploaded file through req.file

Here is an example content of req.file:

{
    fieldname: 'attachment',
    originalname: 'my-cool-image.jpg',
    encoding: '7bit',
    mimetype: 'image/jpeg',
    destination: 'attachments/3877b518-0691-4c99-83be-9bd188669dbe',
    filename: '3877b518-06911444070641364.jpg',
    path: 'attachments/3877b518-0691-4c99-83be-9bd188669dbe/3877b518-06911444070641364.jpg',
    size: 24346
}

from multer-storage-s3.

mebibou avatar mebibou commented on July 24, 2024

yes but I am asking for the Location returned by aws, which is the path on the bucket, something that looks like https://<bucket>.s3-<region>.amazonaws.com/...

from multer-storage-s3.

OriginalEXE avatar OriginalEXE commented on July 24, 2024

Hi,

thank you for the suggestion, I have now added both ETag and Location to the callback, under the s3 key.

So to access the location, just use the req.file.s3.Location.

Updated the npm package to 1.0.2

from multer-storage-s3.

Related Issues (4)

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.