hayageek / jquery-upload-file

jQuery Upload File plugin provides Multiple file Uploads with progress bar.Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.
http://hayageek.com/
MIT License
682 stars 417 forks source link

I find one file is not uploaded correctly in ajax request #197

Open landall opened 4 years ago

landall commented 4 years ago

I can upload other files but this one. some fields of http request: Content-Length: 92 ------WebKitFormBoundaryx69wMmFWPBUleYQT Content-Disposition: form-data; name="myfile"; filename="3930572329_img_story_total_1.dds.mod.dds.png" Content-Type: image/png

------WebKitFormBoundaryx69wMmFWPBUleYQT--

3930572329_img_story_total_1 dds mod dds

Chrome 81.0.4044.129

Core code:

$("#fileuploader").uploadFile({
url:"f_upload.php?a=attachments&c=2&e=24",
fileName:"myfile",
showPreview:true,
maxFileSize:5*1024*1024,
onSuccess: function(files,data,xhr,pd) {
console.log('Upload.OnSuccess:');
console.log(data);
},
onError: function(files,status,errMsg,pd)
{
console.log('Upload.OnError:');
console.log(status);
console.log(errMsg);
}
});
landall commented 4 years ago

I find why. the server side does not judge $_FILES["myfile"]["error"] when the upload is failed for server-side reason.