A dinamic multiple upload using multer.

92 views
Skip to first unread message

Filippo Tenaglia

unread,
Oct 5, 2016, 9:04:18 AM10/5/16
to Express
Hello every body,
I'm trying to develop an "exstension" of multer to accept multiple input files and using different parameters depends from the file uploading.
I'm not mothertoungue so I want do an example to explain better what I should do:
Imagine an form html where an user should insert different fields, some text and some files (for example an image(an user's photo) and a document text eg. a Curriculum Vitae);
Well, I find the way to change dinamically the destination's folder, the name and the filefilter but not the limits "parameters"!
this is the code that I wrote to set destination:
destination:function (req, file, cb)
{ cb(null, obj.destination[inputName]);}

but when I try to do the same on limits' parameters they are ignored!
Some one can help me?
Thank you in advance!
Reply all
Reply to author
Forward
0 new messages