title: Upload File With JavaScript and REST API from Azure Storage for PhoneGap
body: <p>I am working with the Azure Storage API, I have my URL with SAS, as well as the code that captures is the photo, audio or video of my phone with PhoneGap.</p>
  
  <p>When the phone stores the photo, audio, video... gives me a route. </p>
  
  <p>I have the local file on my device, the question is... how it should be uploaded my file?
  Bytes, base64... was looking for documentation in this regard, but can not find.</p>
  
  <p>Annex code that I am using to upload the file, not is if it is the right thing.
  My question is "data" which should be</p>
  
  <pre><code>$.ajax({
              url: uri,
              type: "PUT",
              data: requestData,
              beforeSend: function(xhr) {
                  xhr.setRequestHeader('x-ms-blob-type', 'BlockBlob');
              },
              success: function (data, status) {
                  console.log(data);
                  console.log(status);
              },
              error: function(xhr, desc, err) {
                  console.log(desc);
                  console.log(err);
              }
          });
  </code></pre>