Would be great to set a limit of how many files can be uploaded feature, any way around this without modifying the component?
@André Pinho :You have to edit the "Private\JavaScriptNode" yourself:With for example a variable 'MaxAmount' you can use this in the JavaScript.You cannot deny the end-user to select more files, but only prevent the upload of more than the maximum allowed:You can for example change this:
if(filesProccessed == numberOfFiles){ //all files have been added to the JSON array
into:
if(filesProccessed == numberOfFiles ||
filesProccessed == MaxAmount
){ //all files have been added to the JSON array
Also you have to prevent the
reader.readAsDataURL(file);
to run when MaxAmount is reached.......
yes you can do.you can install the forge component in your environment and you can modify the component as per your requirement.
Thanks both, I know this could be solved with JS, I guess this was a suggested approach to the component team to look into, rather than forking myself, or just in case I missed an obvious shortcut that avoided the modification of the component. Thank you for the detail Jeroen, maybe the component team can add this to their 'roadmap'.