Using the Azure Portal blob storage file upload via browser, how do I make it so the system automatically detects a file uses Brotli compression and sets 'br' as encoding type?
For example, if I upload a .js file using the Azure Portal file upload in-browser, the file's content type is automatically set to "application/x-javascript".
If I upload a file with .br extension, is there a way the Azure storage could detect it is a "brotli" compressed file and thus set the content-encoding for that file to "br" automatically? Right now I have to do this manually on every file.
Azure will not automatically add your
content-encoding. If you need to upload the blob with content-encoding set tobr, you can use the following Python code, which will upload the .br extension file and set the content-encoding.Code:
The above code was executed and uploaded file to the Azure blob storage by setting the content encoding.
Output:
Reference: