knownasilya / ember-plupload

Ember component for handling uploads using plupload
MIT License
87 stars 53 forks source link

Limit number of selected files when multiple is enabled #50

Open wanxie opened 8 years ago

wanxie commented 8 years ago

How do I limit the number of selected files?

What I want is to limit 2 files and when user selected 3, alert a message and do nothing afterward. I tried to use onfileadd to alert the message but it actually call alert 3 times, one for each files. I only needed one?

Also, is there a way to call upload only once for all files instead call upload for each file in onfileadd? Example would be using onchange event of the html file input.

Thanks

tim-evans commented 7 years ago

I'm not sure if this is possible for the selection. :/