anacronw / multer-s3

multer storage engine for amazon s3
MIT License
660 stars 190 forks source link

File size is not defined #106

Closed maheshsetti closed 3 years ago

maheshsetti commented 6 years ago

Im trying get file size, but size key is missing. I can see only following information.

{
"fieldname":"files", "originalname":"Art-Factory-Radha-Krishna-Painting-SDL886121492-1-1274f.jpg", "encoding":"7bit", "mimetype":"image/jpeg" }

rakshith-ravi commented 4 years ago

@maheshsetti were you ever able to find the solution to this?

maheshsetti commented 4 years ago

It's available in the request object.

{ name: req.file.originalname, size: req.file.size, mime: req.file.mimetype, path: req.file.key }

rakshith-ravi commented 4 years ago

Yes indeed, but in my case, however, the req.file.size is different than the actual size of the file uploaded to S3. Could the file size information be wrong by any chance?

maheshsetti commented 4 years ago

Can you share your code? It seems fine in my case.

LinusU commented 3 years ago

Closing due to inactivity...