In this plugin we can set various conditions/restrictions on file upload (e.g. acceptFileTypes, maxFileSize, maxNumberOfFiles, etc..)
Whenever a file is added, an event is fired "fileuploadadd" and once the file is added successfully another event is fired "fileuploadadded".
However, when a file is added and it fails one of these condition/restriction (e.g. user tries to upload 2GB file, or text file instead of an image), there is no way find out programatically that this has occurred.
When this conditions fail, no event is fired. What can I use to check that the file user had selected has an error and hence hasn't been added to the queue.
The only way I can think is it fires an "add" event and wait and see if it doesn't fire "added" event then there is a problem. However, I neither want to halt all processing for long time nor wants to check too quickly whether the "added" event has fired or not.
OR
Can anyone please guide on how to throw a custom event (e.g. fileaddfailedevent) from this plugin?