Here you would need to ensure that you’re using a Shared Access Signature URL with write permission to upload files into blob storage.įollowing are the elements of a CORS rule: Allowed Origins Your request still need to be authenticated.
Also from code perspective, we will focus on the Storage Client Library and not the REST API. Storage team has written excellent documentation on that and I would encourage you to read that. We will not dig into details about how CORS rules are evaluated by storage service and also we will not get into details about all the restrictions. You are welcome to read that post as well. I wrote a blog post on same subject some time back and for this post we will use a lot of code from that post only. We will talk about how you can enable CORS for blob service, manage CORS rules and then we will end the post with an example of simple HTML based file uploader which will directly upload a file from your computer to blob storage.
In this blog post, we will focus on CORS and that too for blob service. One of the important changes is the support for Cross-Origin Resource Sharing (CORS) for the Blob, Table, and Queue services. I wrote a blog post summarizing these changes which you can read here.
Recently Windows Azure Storage introduced a bunch of new changes.