Using sas token for azure file uploads comes with it’s nitty-gritty detail.
Amongst some other errors, if you encounter the signature-did-not-match. String-to-sign-used-was-racwl…,
error, what you want to do is generate a new sas token but this time, selecting a resource type. If this is your first time integrating media upload with azure blob storage, you may want to check my previous article on how to go about it.
Azure blob shared token has the following resource types: Service, Container, Object. You typical have that error message when non of those were selected.
On Microsoft Azure, navigate to Storage Accounts, Select your storage account…

Next, you should see an interface, right there, click on Security + networking, then Shared access signature.You should see an interface like this:

The part you should be concerned about for this topic is the area circled red.
Typically, you want to select the Container and Object resource type for Allow Resource Types option.

Container Resource type gives access to container level apis. (e.g., Create/Delete Container, Create/Delete Queue, Create/Delete Table, Create/Delete Share, List Blobs/Files and Directories)
while,
Object resouce type gives you access to Access to object-level APIs for blobs, queue messages, table entities, and files(e.g. Put Blob, Query Entity, Get Messages, Create File, etc.)

Once the resource types are checked, select the start and expiry dates for your sas token then click on “Generate SAS and connection string”. Copy your blob sas token and update in your project. That should do.
Let me know if all it’s good at your end.
Leave a Reply