Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to upload multiple files ? #31

Open
agregator123 opened this issue Apr 16, 2017 · 7 comments
Open

how to upload multiple files ? #31

agregator123 opened this issue Apr 16, 2017 · 7 comments

Comments

@agregator123
Copy link

agregator123 commented Apr 16, 2017

With this script i can't upload multiple files.
I added input like this:
<input id="file" type="file" name="file" multiple/>
but even if i choose multiple files, the preview shows me only one and in php i get only one file with $_FILES['file']

Maybe i don't understand the script or i miss something. Please, help me.

@null-ref-0000
Copy link

I am having a similar issue. I see multiple files in preview, but only one file is sent in post data.

@null-ref-0000
Copy link

Any suggestions for this issue?

@evandrolacerda
Copy link

I am having the same issue. Does anybody found any solution?

@null-ref-0000
Copy link

I ended up using a different library as I was never able to resolve the issue.

@evandrolacerda
Copy link

@keanesf what library you used instead?

@ronjordan
Copy link

Hello, boys,
I solved it this way!

First step - Replace HTML:

<input id="file" type="file" name="file" />
to
<input id="file" type="file" name="file" multiple="multiple" />

Second step - Replace JS (pekeUpload.js v2.0):

Line 103:
//pekeUpload.checkFile(pekeUpload.obj[0].files[0]);
make a comment out

And new Line 103:

for (var i = 0; i < pekeUpload.obj[0].files.length; i++) {
    pekeUpload.checkFile(pekeUpload.obj[0].files[i]);
}

And that's it

It works with both:
dragMode: false OR true
also in the dragarea or button

Lots of fun
Ron

@podxboq
Copy link

podxboq commented May 29, 2020

But v2.1.1 version, I replace the line 60

a.checkFile(a.obj[0].files[0])

by

for (var i = 0; i < a.obj[0].files.length; i++) {
a.checkFile(a.obj[0].files[i]);
}

Thanks @ronjordan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants