Welcome Guest, Not a member yet? Register   Sign In
Upload cdr and psd files
#1

[eluser]Marlon Renan[/eluser]
Hi everyone, I'm having problem when uploading cdr and psd files, thats the error:

The filetype you are attempting to upload is not allowed.

I've already specify in $config['allowed_types'] = 'gif|jpg|png|cdr|psd|zip|rar'; But it
doesn't work

Does anyone know what is happenning?
thanks!
#2

[eluser]codernow[/eluser]
You will also need to edit your mimes.php file found within system/application/config.

Here is the entry I used for psd files.

change this:
Code:
'psd'    =>    'application/x-photoshop',

to this:

Code:
'psd'    =>    array('image/photoshop', 'image/x-photoshop', 'image/psd', 'application/photoshop', 'application/psd', 'zz-application/zz-winassoc-psd'),
#3

[eluser]Marlon Renan[/eluser]
codernow, thanks dude! It was giving me a headache =]

I used $this->upload->data() to display file_type, then I change mimes.php

this:
Code:
'psd'    =>    'application/x-photoshop',

to this:
Code:
'psd'    =>    array('application/x-photoshop','application/octet-stream'),
'cdr'   =>      array('application/octet-stream','application/x-zip-compressed','image/x-coreldraw'),

It works perfectly =)
thanks very much
#4

[eluser]codernow[/eluser]
No problem. I was having similar problems with ZIP files.




Theme © iAndrew 2016 - Forum software by © MyBB