【问题标题】:How to copy files from one folder to another folder in azure storage in the same container in python?如何将文件从一个文件夹复制到 python 中同一容器中的 azure 存储中的另一个文件夹?
【发布时间】:2020-02-14 02:09:32
【问题描述】:

Azure-storage-blob 仅包含从独立托管文件复制的 copy_from_url,而不是 azure 存储容器中的文件。

【问题讨论】:

标签: azure


【解决方案1】:
bc = BlobClient.from_connection_string(c["LANDING_CONNECTION_STRING"],c["LANDING_CONTAINER_NAME"],c["blobDirectory"]+"/"+blobname)
client = BlobServiceClient.from_connection_string(c["LANDING_CONNECTION_STRING"])
new_blob = client.get_blob_client(c["LANDING_CONTAINER_NAME"],c["ArchivalDirectory"]+"/"+blobname)
new_blob.start_copy_from_url(bc.url)

【讨论】:

    猜你喜欢
    • 2021-12-27
    • 2017-10-25
    • 2021-03-13
    • 2015-04-27
    • 1970-01-01
    • 2020-05-19
    • 1970-01-01
    • 1970-01-01
    • 2022-01-18
    相关资源
    最近更新 更多