gpt4 book ai didi

azure - 公开 Blob 存储并上传到其中

转载 作者:行者123 更新时间:2023-12-02 22:53:21 28 4
gpt4 key购买 nike

尝试使用curl命令上传到blob存储

curl --upload-file <file> --url "https://<storage-account-name>.blob.core.windows.net/<container-name>/<file>"

但不断收到“HTTP/1.1 404 指定的资源不存在”。我将存储和容器都公开,容器的访问级别设置为“容器”,不知道还可以尝试什么。我错过了什么吗?

最佳答案

生成具有写入访问权限的 SAS token 并添加 x-ms-blob-type header 有效。这是curl命令

curl -H "x-ms-blob-type: BlockBlob" --upload-file <file-name> --url "https://<account-name>.blob.core.windows.net/<container-name>/<file-name>?<SAS-token>"

关于azure - 公开 Blob 存储并上传到其中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68849850/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com