As of Chrome 7, Firefox 4, IE 10, Opera 12, and Safari 5 - it is quite possible to programmatically upload file data.

From SBObj.js:

this.PUT = function(theData, theDataContentType) {
    theDataContentType = this.getDefault(theDataContentType, "text/plain");
    var aBlob = new Blob([ theData ], {
        type: theDataContentType
    var aFormData = new FormData();
    aFormData.append("file", aBlob);
    var aDataObj = {
        "type": false,
        "content": aFormData
    private_SendDataObj(private_METHOD_POST, aDataObj);

Where private_SendDataObj is essentially a wrapper for xhr.send(aDataObj.content);. Be sure that there are NO setRequestHeader method calls on the xhr object; even though the Django: File Uploads documentation tells you otherwise.

Django's request.FILES

Google App Engine with django-nonrel to be specific, we can pull in the file data.

From storagebin/ and storagebin/internal/

elif request.method == 'POST':
    if request.FILES and len(request.FILES) == 1:
        uploaded_file = request.FILES['file']
        # write new data
        file_name = files.blobstore.create(uploaded_file.content_type)
        with, 'a') as f:


180 words. Post tags: html5, FormData, multipart, JavaScript, and Django.

Post content is written by Jason Zerbe and licensed CC BY-NC 3.0.