1

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.

Paul Dessert
  • 6,363
  • 8
  • 47
  • 74
  • Try this: http://ellislab.com/forums/viewthread/148809/#723876 – Paul Dessert Sep 10 '13 at 08:03
  • possible duplicate of [CodeIgniter "The filetype you are attempting to upload is not allowed."](http://stackoverflow.com/questions/10078885/codeigniter-the-filetype-you-are-attempting-to-upload-is-not-allowed) – Bora Sep 10 '13 at 08:03

3 Answers3

1

Try to use the following it accepts all files

$config['allowed_types'] = ' * ' ;

saurabh kamble
  • 1,510
  • 2
  • 25
  • 42
0

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.

Alex Hermida
  • 50
  • 2
  • 8
0

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.

Robin Castlin
  • 10,956
  • 1
  • 28
  • 44