Xupload And File Type Problem

Hi, I have a problem with this extension.

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.

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

Submit a pull request on Github and either Asgaroth or I can merge your changes in.

Try like this:


'acceptFileTypes' => "js:/(\.|\/)(jpe?g|png)$/i"

Saludos!