Skip to content Skip to sidebar Skip to footer

Request.files Is Empty

I have a form with an for selecting images to upload, and once upload button is clicked, a POST XMLHttpRequest is sent which calls the upload_view that sh

Solution 1:

You need to append each file individually.

var fd = new FormData();
var files = document.getElementById('fileToUpload').files;
for (var x=0; x < files.length; x++) {
    fd.append("fileToUpload", files[x]);
}

Post a Comment for "Request.files Is Empty"