Delete selected File in Uploader


Example: I try to check extension of a selcted file. If it’s not “jpg” i would like to delete the selected file directly out of the uploader box.
checking extension works with:

Form.attachEvent("onFileAdd",function(realName){ ... });

But how can i delete a selected but still not uploaded file out of the uploader box ?

Thank you in advance

Problem solved. I changed “this._addFileToList”-Function (dhtmlxform_item_upload.js)

var extension = name.split('.');
extension = extension[extension.length - 1];
if (extension.toLowerCase() != 'jpg') {
   alert('Es sind nur Dateien im \'JPG\' Format erlaubt !');

Thank you anyway :smiley:


thanks. I will think how to improve this