尝试将文件夹从我的电脑上传到我的存储帐户中的容器。做了一些挖掘,这就是我到目前为止所尝试的。
az storage blob upload-batch --destination {STORAGE_CONTAINER} --account-name {ACCOUNT_NAME}
--destination-path {STORAGE_CONTAINER_NAME} --source {local_directory}
大部分内容都非常简单,但我想知道目标路径是什么。以下是我从--help
得到的信息,所以我想知道它是否是存储容器名称?
The destination path that will be prepended to the blob name.
最佳答案
Most of it is pretty straight forward but I am wondering about what the destination-path is.
destination-path
是将上传 blob 的虚拟文件夹。
例如,假设您有一个名为 static-content
的 Blob 容器,并且您想要在其中上传一些图像,但您希望这些图像位于 images
文件夹中在那个容器里面。此时,您将 destination-path
设置为 images
。
此脚本将执行的操作是将目标路径的值添加到 blob 名称的前面。例如,如果您要上传 logo.png
且目标路径设置为 images
,则 Blob 的名称将为 images/logo.png
并且 blob URL 为 https://account.blob.core.windows.net/container/images/logo.png
。
关于azure - 使用 Azure CLI 将文件夹从 PC 上传到存储帐户容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72960554/