I think the question says it all: How can I upload an image to an azure blob storage using JavaScript for Windows 8 Apps? I can only find examples for C# on the internet but nothing for JavaScript.
2 Answers
You need to have the sas (shared access signature) url for the azure container/blob. then, you can use this code snippet with minor modification to upload your image.
It is highly unlikely that someone would put the storage primary key in the windows store app code. you can refer this code to generate authorization header for the request. This code does not need sas url for the container. but needs the storage account name and primary key to generate authorization header.
If the azure container or blob can be made public for write (I have not tried) - the first solution can be used without SAS url.
Comments
You can't unless the javascript makes an async call back to your app. The Azure BLOB REST API (and all the Azure REST APIs) require request header modification to include security credentials. See an explicit answer to your question here.