Dani3lSun / apex-plugin-dropzone

Oracle APEX Region Plugin - Dropzone
MIT License
72 stars 19 forks source link

Dropzone Upload File Error does not trigger when number of files exceeded the Max Limit #13

Closed GasparYYC closed 7 years ago

GasparYYC commented 7 years ago

Expected behavior

I thought the Upload File Error (in DA) would recognize when the number of files exceeded the max Files Limit defined for the PlugIn

Actual behavior

Even if files failed to load the condition of Upload File Error does not seem to trigger.

Steps to reproduce the issue

Set max Limit to 20 Create a DA With Event Upload File Error on region Dropzone Load the Dropzone with 21 or more files The files over the limit remain with the 'X' but nowhere it was triggered the fact that files failed to load.

APEX version (4.2.6 / 5.0.3)

5.0.3

Used web server / version and platform (ORDS 3.0.3 / Tomcat 7 / Apache 2.4 / Linux x64)

Tomcat 7

Used web browser / version and platform (Chrome 48 Mac / Firefox 44 Windows)

Chrome 55.0.2883.87 m (64-bit)

Note: Maybe consider adding a new Component Event given that it actually managed the max limit, unfortunately there is no way to see if all I dragged actually loaded or just some.

Dani3lSun commented 7 years ago

Hey @GasparYYC

thanks for pointing this out. As in the readme said, these new events are for the AJAX actions (e.g AJAX upload error/success & AJAX delete error/success). But I have just added a new event "Dropzone max files exceeded" to the plugin. This event is fired for every file that exceeded the maxFiles value. (this.data holds the file information).

New DA with Event "Dropzone max files exceeded" Action: Execute JavaScript Code:

var file = this.data;
console.log(file.name);

I think version 1.9.6 is ready for a release today...