Upload file to Azure Blob Storage directly from browser?

后端 未结 5 847
北海茫月
北海茫月 2020-12-08 10:43

Is it possible to create an html form to allow web users to upload files directly to azure blob store without using another server as a intermediary? S3 and GAW blobstore b

5条回答
  •  天命终不由人
    2020-12-08 11:21

    Now that Windows Azure storage services support CORS, you can do this. You can see the announcement here: Windows Azure Storage Release - Introducing CORS, JSON, Minute Metrics, and More.

    I have a simple example that illustrates this scenario here: http://www.contentmaster.com/azure/windows-azure-storage-cors/

    The example shows how to upload and download directly from a private blob using jQuery.ajax. This example still requires a server component to generate the shared access signature: this avoids the need to expose the storage account key in the client code.

提交回复
热议问题