Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync command not setting correct content types #555

Open
vc-ash opened this issue Feb 25, 2019 · 2 comments
Open

sync command not setting correct content types #555

vc-ash opened this issue Feb 25, 2019 · 2 comments

Comments

@vc-ash
Copy link

vc-ash commented Feb 25, 2019

I used the b2 sync command to sync a folder from my server to B2, but the content types (file types) were not what they should've been. I am uploading .ts and .m3u8 files for HLS videos and need their content types to be set to "video/mp2t" and "application/vnd.apple.mpegurl" respectively. I can manually set them using the b2 upload-file command, but I have thousands upon thousands of files to upload and the sync command is much faster and more ideal to use.

I couldn't find any documentation for the sync command on setting the content types.
Are the content types (mime types) coming from what's defined in my system or are they automatically being set on B2's end when they are received?

Is there a way to make sure the content types are set correctly while using the sync command?

Thanks

@ppolewicz
Copy link
Collaborator

Currently the mime type is based on file extension.

How would you like to set it in case of sync command?

@mjurbanski-reef
Copy link
Collaborator

It does seem like the current automatic content type assignment, which is done on server side using this list https://www.backblaze.com/docs/cloud-storage-b2-content-type-mappings does indeed not set the mime type automatically for .ts files (it does for m3u8).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants