title: Upload files from html to azure
body: <p>I currently have an asp page which uses an asp control to upload files to azure. The control runs server side code which reads the file into azure local storage and then transfers the file from local storage to blob storage. This works fine. However, I would like to replace the asp control with an html control so that, in the longer term, I can run the page offline as an html page (I realise I will have to adapt the file upload again for it to work offline but as a first step I want to remove any server side controls).</p>
  
  <p>I found the blog posts:</p>
  
  <p><a href="http://coderead.wordpress.com/2012/11/21/uploading-files-directly-to-blob-storage-from-the-browser/" rel="nofollow">http://coderead.wordpress.com/2012/11/21/uploading-files-directly-to-blob-storage-from-the-browser/</a></p>
  
  <p><a href="http://gauravmantri.com/2013/02/16/uploading-large-files-in-windows-azure-blob-storage-using-shared-access-signature-html-and-javascript/" rel="nofollow">http://gauravmantri.com/2013/02/16/uploading-large-files-in-windows-azure-blob-storage-using-shared-access-signature-html-and-javascript/</a></p>
  
  <p>I tried uploading my file directly to blob storage as shown in these posts but ran into the problem outlined by Gaurav in answer to a previous question I posted ('Upload an image file to azure blob storage from js'). That is, that this technique only works if my page is also held in blob storage. My page is part of an azure cloud service and I'm not sure how I could integrate a page held in blob storage into my cloud service. How would this work when I want to publish my package to azure?</p>
  
  <p>The other way I tried to solve this problem was to upload my file from html to azure local storage and then call a web service to transfer the file from local storage to blob storage (much as I had done for the asp solution). However, I couldn't work out how to get hold of the file in js and transfer it to azure local storage (I'm pretty new to js).</p>
  
  <p>So, apologies if this is really more than one question i.e.:
  How can I integrate a page held in blob storage into a cloud service?
  OR How can I use js and html to transfer a file to azure local storage?
  OR Is there another way of doing this entirely?</p>
  
  <p>If anyone can help me with any of these questions I would be really grateful. </p>