Need to check filenames before upload startsNeed to check filenames before upload startsI am using JfileUpload and JbatchUpload and I have a requirement where I need to make sure that only one file of a certain extension is uploaded in a session. I get the filelist in JSTransferTriggered() but the problem is by that time, the upload already started. Is there a way to pause before upload starts so I can check the extensions of the files and cancel it or display a warning if there are files that don't meet my criteria?
Re: Need to check filenames before upload startsWhy not using "whitelist" parameter to make sure only allowed extension are used ?
Also there is a callback that may help: Enable to following properties in i18n_pane.properties: js.notification.selection=JSSelectionInfo Then add the following JavaScript function in your HTML: function JSSelectionInfo(amount, size) { //amount is number of files to transfer; //size of all files to transfer } If you want a callback with all filenames (including the one in folders and subfolders) then we would need to develop a custom feature. You can contact support(at)jfileupload(dot)com. |