I want to add acceptFileTypes option to the fileupdaload jQuery function, witch is wrapped in teh eextension xUpload.
the problem is that the acceptFileTypes option expect a regurar expresion.
Quote
acceptFileTypes
The regular expression for allowed file types, matches against either file type or file name as only browsers with support for the File API report the file type.
Type: Regular Expression
Example: /(\.|\/)(gif|jpe?g|png)$/i
and the extension uses the function CJavaScript::enconde() to enconde an aaray of options.
but the function return:
.fileupload({'url':'/index.php?r=cuota/uploadArchivoPagos','autoUpload':false,'maxNumberOfFiles':1,'acceptFileTypes':'/(\.|\/)(txt|dat)$/i)'};
and I need :
'acceptFileTypes':/(\.|\/)(txt|dat)$/i)
without the quotes...
Any idea?
Best Regards