Azure / Azure/MachineLearningNotebooks

azureml.data.azure_storage_datastore upload_files() does not set mime type when uploading to storage container static website.

Open
#1,610 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
4.4k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Uploading files to the designated $web container using the python sdk upload_files() command to a blob storage static website does not correctly set the mime type to "text/html" for files with .html suffixes. See https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.data.azure_storage_datastore.azureblobdatastore?view=azure-ml-py#upload-src-dir--target-path-none--overwrite-false--show-progress-true-

This should be done automatically on upload as mentioned in https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website-how-to?tabs=azure-cli

The work-around is to manually set content type in the Storage Explorer, to programmatically use the Python SDK `set_http_headers(content_settings=None, **kwargs)`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.