Closed alex-burak closed 8 years ago
I got the same problem after updating Simple-Ajax-Uploader. I am using Python and got a list of two items with request.get_form_var("image_file"). It should only be the file and it worked before.
It should be:
------WebKitFormBoundaryo0LnhAZmbT54DaqP
Content-Disposition: form-data; name="image_file"; filename="C215A847-8449-4669-BC05-743647197075.png"
Content-Type: image/png
------WebKitFormBoundaryo0LnhAZmbT54DaqP--
but I got:
------WebKitFormBoundaryAGUUhkaUJwvP1Pd9
Content-Disposition: form-data; name="image_file"
C215A847-8449-4669-BC05-743647197075.png
------WebKitFormBoundaryAGUUhkaUJwvP1Pd9
Content-Disposition: form-data; name="image_file"; filename="C215A847-8449-4669-BC05-743647197075.png"
Content-Type: image/png
------WebKitFormBoundaryAGUUhkaUJwvP1Pd9--
When uploading multiple files (multiple: true), even when setting 'multipart: true', the uploader is making one POST call per each file instead of just ONE call. Am I doing something wrong?
@ygr2013 @subrays I know this is way late, but it just occurred to me how this is happening. To fix it, either upgrade to version 2.4 (which fixes the issue), or set noParams: true
in your JS settings.
@eubyte You are not doing anything wrong, that is correct -- each file is uploaded individually. I'm looking into an update that will allow multiple files in one upload request.
When sending files with "multipart: true" setting, form submitted looks like this: Content-Disposition: form-data; name="filename"
myfile.txt -----------------------------79001742426903 Content-Disposition: form-data; name="filename"; filename="myfile.txt" Content-Type: application/vnd.ms-excel