我有一个container,名为test in azure storage。我想为此生成URL。它里面的文件目录如下所示:
test
-> annotate # This is a dir
-> file1.txt
-> file2.txt
-> images # This is a dir
-> file1.jpg
-> file2.jpg
我想要生成URL,以便当访问它时,我可以下载完整的容器test,包括它里面的所有文件和目录。现在我已经这样做了,但是在这种方法中,我只是使
我正在尝试从客户的azure存储中下载JSON格式的blob数据。
我有包含SAS令牌的帐户URL、SAS令牌本身以及连接URL。
但是,当我尝试从他们的服务器下载blob时,我得到了以下错误:
This request is not authorized to perform this operation using this resource type.
RequestId:d6d9d23e-301e-0078-32be-ecd22a000000
Time:2020-02-26T16:02:05.6188260Z
ErrorCode:AuthorizationResourceTypeMis
我在一个azure函数中运行了这个函数,以获得浏览器应用程序上传到azure blob存储的sas令牌:
var azure = require('azure-storage');
module.exports = function(context, req) {
if (req.body.container) {
// The following values can be used for permissions:
// "a" (Add), "r" (Read), "w" (Write), "d
对于我的场景,我尝试允许用户使用javascript将文件拖放到网页上,然后上传到容器中,上传类似于wordpress媒体上传管理端的文件。我遇到的问题是我找到了为容器创建SAS url的代码,
//Set the expiry time and permissions for the container.
//In this case no start time is specified, so the shared access signature becomes valid immediately.
SharedAccessBlobPoli