Uploader, v3.4.1
This service lets you upload files faster and easier than before.
Other Versions
3.4.1, 3.2.12, 3.2.11, 3.2.10, 3.2.9, 3.2.6, 3.2.5, 3.2.4, 3.2.2, 3.2.1, 3.1.9, 3.1.8
BrowserPlus.Uploader.upload({params}, function{}())
Upload to a URL using POST and multi-part form data as described at http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2 Return object value contains keys statusCode, statusString, headers, and body. Cross domain uploads are allowed if the destination host has a master policy file which allows uploads from the source domain (research crossdomain.xml policy files).
Test: upload()
Parameters
- url: string
- The url to POST the file to. Can be relative to invoking URL, e.g. if service is invoked from http://www.foo.com/uploader/index.html and url argument is upload.php, the final url will be http://www.foo.com/uploader/upload.php
- files: map
- A map. Key is the name of the post variable expected by the web page, value is the filehandle to be uploaded for that post variable.
- cookies: string (Optional)
- Cookies that will be appended to the HTTP header of the POST.
- postvars: map (Optional)
- Additional data that is posted to the web server.
- progressCallback: callback (Optional)
- An optional progress callback which is passed an object with the following keys: (file, filePercent, fileSent, fileSize, totalPercent, totalSent, totalSize). For each file being uploaded, the callback is guaranteed to called with filePercent values of 0 and 100 (unless an error occurs).
- responseProgressCallback: callback (Optional)
- An optional response body progress callback which is passed an object with the following keys: (percent, bytesReceived, totalBytes).
- timeout: integer (Optional)
- An optional integer value between 3 and 240s that places an upper bound in seconds on how long to wait without being able to send or receive data from the server (i.e. while server is processing uploaded content). Default is 240s)
BrowserPlus.Uploader.simpleUpload({params}, function{}())
Upload a single file to a URL using POST. Return object value contains keys statusCode, statusString, headers, and body. Cross domain uploads are allowed if the destination host has a master policy file which allows uploads from the source domain (research crossdomain.xml policy files).
Test: simpleUpload()
Parameters
- url: string
- The url to POST the file to. Can be relative to invoking URL, e.g. if service is invoked from http://www.foo.com/uploader/index.html and url argument is upload.php, the final url will be http://www.foo.com/uploader/upload.php
- file: path
- The filehandle to upload.
- cookies: string (Optional)
- Cookies that will be appended to the HTTP header of the POST.
- progressCallback: callback (Optional)
- An optional progress callback which is passed an object with the following keys: (file, filePercent, fileSent, fileSize, totalPercent, totalSent, totalSize). For each file being uploaded, the callback is guaranteed to called with filePercent values of 0 and 100 (unless an error occurs).
- responseProgressCallback: callback (Optional)
- An optional response body progress callback which is passed an object with the following keys: (percent, bytesReceived, totalBytes).
- timeout: integer (Optional)
- An optional integer value between 3 and 240s that places an upper bound in seconds on how long to wait without being able to send or receive data from the server (i.e. while server is processing uploaded content). Default is 240s)
BrowserPlus.Uploader.cancel({params}, function{}())
Cancel an upload
Test: cancel()
Parameters
No Parameters


