Ability to set mime type for extensions

Hey guys,

I'm trying to upload my HTML files without extension and have them set as content type application/html so when my s3 compatible bucket loads /privacy, etc. I don't have to show .html. I think it's cool! So in the rclone command, I'd like to add

--mime='EXTENSION,MIME_TYPE'

so you can customize mime types

--mime='png,image/png'

or for my case

--mime=',application/html'

obviously since extension is empty, this would match items without extension.

alternatively, one could supply a regex. I'm not sure how that would work.

is this a feature you guys would add? I could try myself, but don't have a lot of time to do it now. But shouldn't be too hard.

You should be able to add --header-upload "Content-type: text/html" to add a Content-type header to all files. You'd have to upload the non html separately but that is easy with rclone filters (--exclude "*.*" and --include "*.*")

Hm, it seems to be complaining about --exclude and --include... but with ChatGPT I have success! Thanks sir! I'm glad I didn't have to start a github issue.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.