Reputation: 63
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?
Upvotes: 2
Views: 2500
Reputation: 51
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'
Upvotes: 5