Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

136
Views
How to correctly download file from AWS S3 in Express/React app

I have app where user can upload files to S3 storage. This works fine so far. After that I wanted to add download functionality so I followed each steps from some tutorials for the backend part. When I send download request from the client, the server send me object as a response but the file doesn't download. I'm beginner on this so I have no idea if I made any mistakes on backend code or it's correct but it need to do more thing. Thanks for help.

download: function (req, res) {
        const s3 = new aws.S3({
          region: "eu-central-1",
          accessKeyId: process.env.AWS_ACCESS_KEY,
          secretAccessKey: process.env.AWS_SECRET_KEY
        });
    
        var file = s3
          .getObject({
            Bucket: "my-files",
            Key: example-file
          })
          .createReadStream();
    
       file.pipe(res);
    }

Response [1]: https://i.stack.imgur.com/QeFaX.png

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!