Reputation: 11
A am working on a project using codeigniter. Need to upload PSD file. Trying with this code..
$config['allowed_types'] = 'psd';
But the it show as result : The filetype you are attempting to upload is not allowed.
plesae help me.
Upvotes: 1
Views: 692
Reputation: 1549
Try to use the following it accepts all files
$config['allowed_types'] = ' * ' ;
Upvotes: 1
Reputation: 10996
A bit more risky method, but in one way more logical method I use is to allowe all types $config['allowed_types'] = '*';
and simply validate preg_match("\.psd$", $str_file_name)
before uploading.
All these mime settings in application/config/mime.php
probably exists for a reason, but it's way too overcomplicated with some file types due to silly many different mime types for some cases.
Upvotes: 0
Reputation: 50
Where are you setting $config['allwoed_types']? In the controller or do you have a config/upload.php?
Also check the psd file that you are trying to upload returns a correct mime type.
Check mime types at application/config/mime.php.
Regards.
Upvotes: 0