Closed null-ref-0000 closed 7 years ago
Hi @keanesf thanks for using pekeUpload.
I actually tought that no one used this jQuery plugin these days. Actually, the onSubmit option sends all the files via ajax to the php script before the form submits, try to use the onFileSuccess function and append the data of the file to the form. Since this plugins uses XMLHttpRequest in order to upload the files via ajax, it can't be used with normal form post. You're probably getting the last file uploaded when you process the form because the plugin doesn't destroy the object.
Ok, thanks for the advice. I actually changed my code to use another plugin since I wasn't able to get this to work as I required.
I am using the onSubmit option.
$("#files").pekeUpload({bootstrap: true, allowedExtensions:"jpeg|jpg|png|gif", onSubmit: true, dragMode: true});
When I check the post data sent I can see that only one file was sent.
Content-Disposition: form-data; name="files[images][]"; filename="index2.jpeg"
Content-Type: image/jpeg