Azure / Azure/MachineLearningNotebooks

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

Aperta
#1,610 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Jupyter Notebook
Stelle
4.4k
Fork
2.6k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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)`

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia dal punto di ingresso upload_files() dell'SDK Python per azureblobdatastore e confronta il suo comportamento con la documentazione del sito web statico collegata nell'issue. Controlla il workaround set_http_headers() e verifica che il caricamento di file .html nel contenitore $web produca un tipo di contenuto text/html.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
azure, python
Ambito
cloud
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.