anacronw / multer-s3

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

File size is 0 for quicktime files #183

Open jahaskell53 opened 2 years ago

jahaskell53 commented 2 years ago

when uploading a .mov file to multer-s3, it returns a file obj that has 0 for its fileSize property

amcjen commented 2 years ago

I'm seeing the same thing for .wav and .aiff files. .aac, .m4v, .mp3, all work though.

ingfraga commented 1 year ago

Same for Excel files! Any solution? or any other way to fetch the size?

amcjen commented 1 year ago

Same for Excel files! Any solution? or any other way to fetch the size?

My solution was to fetch the filesize client-side and pass it over in the request body instead of server-side. Not sure that works for everyone, but resolved the issue for me perfectly.

The Javascript File interface offers a size property.

lehni commented 1 year ago

I just had the same problem and fixed this in #204