Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Support upload to blob with content-type #95

Closed
@compulim

Description

@compulim

Feature Request Description

Our JavaScript contains some Unicode characters (text ellipsis character "…"), we encode the JavaScript file using UTF-8. And UTF-8 is the standard encoding for modern JavaScript files.

When we upload JavaScript files thru blobxfer, it uploaded with content type of text/javascript, but not text/javascript; charset=utf-8.

Since the file uploaded by blobxfer does not contains charset, when browser load the file, the text ellipsis character turns into garbage.

Although this can be fixed in browser by specifying charset attribute in script element, this attribute is deprecated and not recommended to use.

To workaround our issue, we need to write another tool to set the content type after we uploaded the file via blobxfer.

It will be great if blobxfer offer this functionality.

Describe Preferred Solution

blobxfer support a CLI argument that we can pass the content type for all uploaded blobs.

Describe Alternatives Considered

Instead of using text/javascript for JavaScript files, use text/javascript; charset=utf-8. UTF-8 encoding is a de facto standard for modern JavaScript files.

Additional Context

Our script using blobxfer can be found at https://github.com/Microsoft/BotFramework-WebChat/blob/master/scripts/deploy_cdn.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions