0
我使用requests.get,但它正在我执行文件的机器上下载文件,有没有办法跳过这个?我如何直接从URL到Azure Blob获取数据
r = requests.get(url,stream=True)
file_name = url.split("/")[-1]
with open(file_name, 'wb') as data:
for chunk in r.iter_content(chunk_size = 1024*1024):
if chunk:
data.write(chunk)
block_blob_service.create_blob_from_path(path.join(container,blob),
data.name,
file_name ,
content_settings=ContentSettings(content_type=mimetypes.guess_type('./%s' %url.split("/")[-1])[0]))
https://docs.microsoft.com/en-us/azure/storage/storage-python-how-to-use-blob-storage – diek