简体   繁体   中英

List blobs in Azure storage container via URL

I have a storage account set up and a single container in it. The access level is set to public and I can access the individual blobs as so:

https://img.blob.core.windows.net/images/name_of_blob

However, when I try to access the URL of the container ( images ) directly:

https://img.blob.core.windows.net/images/

I get this response:

<Error>
  <Code>ResourceNotFound</Code>
  <Message>The specified resource does not exist.</Message>
</Error>

Is there a way to get a list of all the blobs within the container through a URL request?

How about using the REST API ?

Something like:

GET https://myaccount.blob.core.windows.net/mycontainer?restype=container&comp=list

Be sure to pass in any required headers as per the documentation linked above.

When you created the container, the public access level must have been set at 'Blob'. If you set the public access level at 'Container' from the dropdown, you should be able to access the list.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM