Arj*_*ary 2 rest azure azure-storage azure-storage-blobs
我有一个等级
my container
  --images
      --img01
      --img02
我想提出休息请求并得到结果: <BlobPrefix>images</BlobPrefix>
如此链接https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/enumerating-blob-resources下的“分隔的Blob列表”部分所示
但是,我没有得到这个结果,而是得到了所有资源名称作为递归调用。好像我没有提供任何分隔符。
要签名的字符串是:
GET /account/mycontainer
x-ms-date:Tue, 07 Feb 2017 05:38:21 GMT
x-ms-version:2016-05-31
comp:list
delimeter:/
maxresults:4
restype:container
我发送的网址:
http://account.blob.core.windows.net/mycontainer?restype=container&comp=list&delimeter=/&maxresults=4
结果我得到:
<xml>
<blobs>
<blob><Name>images/img01</Name>
<blob><Name>images/img02</Name>
</blobs>
</xml>
但是基于上述链接。响应应为:
<xml>
<blobs>
<BlobPrefix>
<Name>images/</Name>
</BlobPrefix >
</xml>
根据您的描述,我检查了定界Blob列表并在我这一边测试了此方法。为了简化此问题,我创建了一个容器,并将“容器公共访问级别”设置为“对容器和Blob的公共读取访问权限”。这是我的Blob容器的文件结构:

https://brucechen.blob.core.windows.net/brucechen?restype=container&comp=list
结果:

https://brucechen.blob.core.windows.net/brucechen?restype=container&comp=list&delimiter=%2F
结果:

根据您的说法stringToSign,名称delimeter不正确,您需要将其更改为delimiter。有关更多详细信息,请参考列出斑点。
| 归档时间: | 
 | 
| 查看次数: | 720 次 | 
| 最近记录: |