I am facing a problem regarding file uploading in Grails.
I would like to check the file size runtime after opening from the windows explorer and give me the error message if any condition fails.
I have a file uploading window where I have 3 file choose options. I would like to check each three files not to be more than 5MB. When I click on Browse button then my system explorer opens and I choose file.
Is there any way to check file size while selecting the file using javascript/ Ajax call? And if the file size is exceeds than the explorer show again to choose another file.
About this issue, there is a plug-in called file-uploader to the rescue.
With this plug-in you can define some restrictions in config.groovy. Here is an example: