-
Notifications
You must be signed in to change notification settings - Fork 261
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
multiple file upload feature or documentation #10
Comments
Hi there, The module does allow multiple file uploads - I'll update the documentation to cover this. If you were two upload two files (i.e. sampleFile1 and sampleFile2), they would both be accessible from:
and
|
var thisFile;
I tried this and it works. Having 1 or more input type as file. But each input file had a different name and posted as enctype="multipart/form-data" works. |
thanks for the information and for also adding a task to write in documentation that covers multiple file upload. |
Release v0.0.6 is up. Better documentation as well. Hope things are going well with this package! |
Just read through the current documentation and it is very clear on how to work with this module . It goes straight to the point to describe the very use case senarios which is awesome . |
Hi, express-fileupload clearly supports multiple file upload when the files are coming from inputs with different names. But does the package support uploading multiple files from a single input tag with the multiple attribute? Something like this: |
The same of @bpiv400. Need get multiple files for the same input |
Hi @bpiv400 , You can upload files like below. app.post('/', function(req, res){
}) |
Hi, @shyamvir2506 it is not working for me.can you log that file variable so that I can check where I went wrong |
I tried and it is working for multiple files upload using for loop like req.files.uploadedfile.lenth is giving the number of the uploaded files, but when I am uploading only a single file then req.files.uploadedfile.lenth is coming as undefined and with this my for loop logic to upload file is not working in case of single upload. If someone can help in this. |
Hi @shadab14meb346 , If you upload single file, middleware adds an object, not an array so there is no 'length' parameter. |
This module doesn't appear to allow multiple file upload. Or if it does the documentation does not cover it.
The text was updated successfully, but these errors were encountered: