I’ve noticed that if I upload a video to Google Drive via an “rclone copy” command it get’s the correct Mime Type assigned and therefore it’s possible to preview it using Google’s transcoded copy.
However if I upload a video using an rclone mount it has a mime type of application/octet-stream “Binary File” I’m assuming this is something to do with the different methods and possibly mount treating every file the same.
Does anyone know of any way to change the Mime Type in Google Drive after it has been uploaded so it will generate a video preview?
Thanks in advance.
I think the mimetype an object gets depends on the initial file name it had. How did you copy these into the mount? Did whatever tool you used call the file
z.avi.temp then rename it to
z.avi or something? That would explain the mime type being wrong. If I just use
cp to copy things to mounts then they get the correct mime type.
I think you can use the API to change the mime type so it is possible… You can use the “Try this API” feature to give it a go on a few files.
Maybe I could add an option to rclone to let google drive guess the mime type on uploads…
Ahh, that would make sense, I think they might get uploaded with a different extension and then renamed. I will try the API you suggested.