Browser Direct Upload Data to Azure Blob Storage Part 0: Outline
Blob Direct Upload Modules and Work Flow
- Enable CORS on the Azure Blob Storage Service side. Unfortunately, Azure Portal does not have any entry for you to configure CORS as in Amazon S3: “HTML Direct Upload Data to Amazon S3 Part 1: S3 Details“. You have to write a small amount of code to do this job. This is also the first step you need to take, please follow the details discussed in this post: “Browser Direct Upload Data to Azure Blob Storage Part 1: CORS“.
- After enabling CORS of Azure Blob Storage, you need to write some HTML code to accept date the user selected from their local computers, this should be almost the same as what I did in Amazon S3 case, follow this: “HTML Direct Upload Data to Amazon S3 Part 3: HTML Details (No Form)“
- Differently From Amazon S3 case in which the signature and the policy could be defined and decided without knowing the uploaded data name, in Azure Blob Storage case, the name of the uploaded file has to be part of the contents used to generate the actual signature (SAS), so we have to create a single PHP page accepting request with the file name in the query string and generate the SAS, the details should be found here : “Browser Direct Upload Data to Azure Blob Storage Part 2: SAS PHP (Tricky!)“
- A final thing interests you might be memory data, this should be exactly the same as in this post: “HTML Direct Upload Data to Amazon S3 Part 5: Memory Data“
(Please specify the source 烟客旅人 sigmainfy — http://www.sigmainfy.com as well as the original permalink
URL for any reprints, and please do not use it for commercial purpose)