更新时间:2023-10-17 18:07:40
您可以像这样显式设置content-type属性:
You can explicitly set the content-type property like this:
from azure.storage.blob import ContentSettings
block_blob_service.create_blob_from_path(
'mycontainer',
'myblockblob',
'mypngimage.png',
content_settings=ContentSettings(content_type='image/png')
)
来源: https://docs.microsoft.com/zh-CN/azure/storage/blobs/storage-python-how-to-use-blob-storage