After uploading an audio (mp3) or video (mp4) file to the TUS server (self hosted on heroku) and then trying to download the file using the TUS url (in order to see in a player) it seems the content-type is set to “application/octet-stream” rather than its actual mime type.
If I upload an image or a pdf file the correct mime type is returned.
What version of tusd are you using (you can get the version by running tusd -version)? Also, does it play back if you upload the files to our public demo at https://tus.io/demo.html?
It seems like when I upload on the demo site and then hard code the resulting tus.io url into my component the request also has the response content-type set to “application/octet-stream”
tusd -version results in the following output:
Version: n/a
Commit: n/a
Date: n/a
I think because this is code running from a git check out. Is there another way I can get the version for you?
So it it looks like the content-type is returned correctly now, which is great…however the VideoJS viewer seems to still not think it can handle it, perhaps because it can’t parse out the file’s extension based on the URL.
I don’t know about VideoJS, so I can’t comment on that. But there is no way using only tusd to have the file extension in the URL. You might be able to achieve that with a reverse proxy, such as nginx, but standard tusd is not capable of that.
So the VideoJS player allows you to pass in a mime-type explicitly (otherwise it uses the file extension) so I ended up just using an ajax call to the file and then pulling the “content-type” out of the header like so: