问题
I have this line on Jquery file upload:
'accept_file_types' => '/.+$/i',
how to I modify that so it accepts all file types except PHP and Javascript files?
回答1:
original
'accept_file_types' => '/.+$/i',
change with
'accept_file_types' => '/\.(gif|jpe?g|png)$/i'
or add new extension
'accept_file_types' => '/\.(gif|jpe?g|png|zip|pdf)$/i'
来源:https://stackoverflow.com/questions/14741239/how-to-have-jquery-upload-accept-all-file-types-but-php-js