Open jamshid opened 9 years ago
Hello,
could you please send me a sample of such file?
Thank you!
Can you install youtube-dl, e.g. "brew install youtube-dl" (http://rg3.github.io/youtube-dl/download.html)?
Then just use it to download a .mp4 file I happened to notice the problem with, ~15MB:
$ youtube-dl -o cops.mp4 'https://www.youtube.com/watch?v=tMoTfLykVcA'
I built riofs with
./configure --with-libmagic
because I want my S3 objects to have a correct MIME type.When riofs uploads a large file, e.g., after saving
youtube-dl 'https://www.youtube.com/watch?v=tMoTfLykVcA'
in /tmp thencp /tmp/cops.mp4 /mnt/riofs/
, I see it does a multipart upload to S3, splitting the file into 3 parts. I see after thePOST
to complete the multipart upload, it does a followupPUT with copy
withContent-type: application/octet-stream
. I expected that to bevideo/mp4
.The problem seems to be that it doesn't try to determine the MIME type until the last part is sent. Is it really only passing that last part's bytes to libmagic?
The file is correctly identified by "file --mime":