I am using signed urls to upload blobs from mobile devices using Air.
I have two questions:
When uploading blobs using a signed URL I assume I don't need to include all the headers as described in the documentation. Am I right in thinking that I simply need to do a PUT
request to the URL and include the file encoded into the body with the Content-Type
set to multipart/form-data; boundary=[[boundary here]]
?
var client:HttpClient = new HttpClient();
var request:HttpRequest = new Put();
request.body = UploaderPostHelper.getPostData( filename, byteArray);
request.contentType = 'multipart/form-data; boundary=' + UploaderPostHelper.getBoundary();
client.request(new URI(signedUrl), request);
http://msdn.microsoft.com/en-us/library/windowsazure/dd179451.aspx
(Source code for UploadPostHelper is here https://code.google.com/p/as3asclublib/source/browse/trunk/net/UploadPostHelper.as)
And secondly, can I specify that I want to do a PUT request using a POST request and a header?
Cheers.