0
votes

I have no access control (IAM) to a container in my Azure Storage Account.

I have to upload a file to Azure Blob Storage and I always get this error -

"Upload block blob to blob store failed. Details: Make sure blob store SAS uri is valid and permission has not expired. Make sure CORS policy on blob store is set correctly. StatusCode = 0, StatusText = ."

I tried to search about it & I understood that some definitions which related to access control are missing. So, I checked what is written in my Access Control tab of the talked container & nothing is viewed there - the tab is empty.

Here the screenshot of my Azure portal in the container which has mentioned before & you can see that nothing is viewed in the Access Control tab.

1
Please edit your question to show how you're attempting to upload to Azure storage. Without seeing your code, it's difficult (or impossible) to guess what's wrong. Are you using your account key? Are you using a container URL that has a Shared Access Signature (SAS)?David Makogon

1 Answers

1
votes

The reason you're getting this error is because you've not set CORS rules properly. You don't need to configure IAM. What you need to do is configure CORS rules. Please see screenshot below:

enter image description here

Just go with the following settings:

Allowed Origins: *

Allowed Methods: Select all methods

Allowed Headers: *

Exposed Headers: *

Max Age: 4800

You can learn more about CORS here: https://docs.microsoft.com/en-us/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services.