danielm / uploader

A lightweight and very configurable jQuery plugin for file uploading using ajax(a sync); includes support for queues, progress tracking and drag and drop.
https://danielmg.org/demo/java-script/uploader
MIT License
1.17k stars 384 forks source link

dmupload how to limit number of upload files? #118

Open vuatintac opened 3 years ago

vuatintac commented 3 years ago

I have a problem I want to limit the number of files when uploading. Example: 5 If the user chooses the number of files more than 5, dmuploader only accept 5 (and skip all over) or reports an error with alert .. Please help me

StreetDog71 commented 2 years ago

Same here, this option would be really useful. I'm guessing it wouldn't be that hard to implement.

I've tried to get around it by counting all the uploaded elements and define a condition, and I managed to make it work. The problem is that this condition evaluates after the files are uploaded. It's not that user friendly to show a "too many files" warning after the user waited for all the files to upload.