locked
Upload File With JavaScript and REST API from Azure Storage for PhoneGap RRS feed

  • Question

  • Hi all,

    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.

    When the phone stores the photo, audio, video... gives me a route. 

    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.

    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

    $.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);
                }
            });


    Atentamente,
    Peter Concha R.
    Developer
    Mail: peter.concha@fcmf.ug.edu.ec
    Twitter: @PeterConchaR
    *** Colabora con el foro ***
    Si la respuesta te es de utilidad marca la pregunta como respondida.

    Tuesday, September 2, 2014 5:35 AM

Answers

All replies