#771·multer

How to get file contents before/after S3 upload?

Author: papaiatisCreated Sep 13, 2019Updated Jun 3, 2025
Labelsenhancement

Hi,

I'm using multer-s3 as a middleware to automatically upload files to an S3 bucket. However, I also need to get the file contents either before or after the S3 upload for further processing. I'd like to avoid downloading the file from S3 as it is supposed to be already in the server's memory. Could not figure out how to get the file contents.

Any idea would be appreciated!