azure - 使用 Azure CLI 将文件夹从 PC 上传到存储帐户容器

标签 azure command-line-interface

尝试将文件夹从我的电脑上传到我的存储帐户中的容器。做了一些挖掘,这就是我到目前为止所尝试的。

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/

相关文章:

c# - 离开 StreamReader 而不关闭 Stream

entity-framework - 如何在 WAWS 配置文件中指定 Entity Framework 连接字符串?

linux - 在 Microsoft Azure 上更改 linux SSH 端口时出现问题

angular - 路由器导航使用 CreateUrlTree

linux - 如何获取文件夹中每个可执行文件的简要说明?

azure - 将消费计划上的 Azure Function App 设置为 64 位

ios - 在 iOS 中解码 OpenSSL AES256 字符串

linux - 这个 zip 文件在解压缩时如何向我的控制台打印一条消息?

android - 使用 Phonegap CLI 制作 Android 项目时遇到的问题

azure - 在 Office 365 Oauth2 身份验证中获取 token