Welcome Guest, Not a member yet? Register   Sign In
Uploading file types
#1

[eluser]doubleplusgood[/eluser]
Hi there,

I seem to be experiencing similar issues to other people with regards to uploading files. I have the following allowed file types;

Code:
$config['allowed_types'] = 'pdf|eps|ai|zip|indd|qxt|gif|jpg|jpeg|bmp|png|psd';

But the only files that will upload are pdf,gif,jpg,jpeg and png. I only happened to get pdf working by moving that to the beginning of the allowed_types.

Is there a way to enable these other types?

Thank you.
#2

[eluser]pistolPete[/eluser]
Do a print_r($_FILES) in order to see which mime type is sent by the browser.
Now add that mime type to the $mimes array in mimes.php.
#3

[eluser]doubleplusgood[/eluser]
Hi Pete,
When I try uploading a PSD the print_r doesn't return anything, except the message The filetype you are attempting to upload is not allowed.

The print_r does work as I uploaded a pdf and the print_r displayed the mime type. Confused
#4

[eluser]doubleplusgood[/eluser]
Hey pete,
Figured out why I couldn't see the print_r. I needed to place it within the part of the if statement that catches errors, in order to display the mime types for indd and psd. Works perfectly now.

These are the new mime types I needed to add;

Code:
'psd'    =>    array('application/x-photoshop', 'image/vnd.adobe.photoshop'),
'indd'    =>  'application/octet-stream',
#5

[eluser]Tibor Katelbach[/eluser]
Hello
just to add a find I took time
I was trying to upload a KMZ (google earth format)
instead of the Google defined mime type application/vnd.google-earth.kmz
the browser uses this application/download

so by adding this

'kml' => 'application/vnd.google-earth.kml+xml',
'kmz' => 'application/download',

to the mimes.php solve the problem
could be added generically to the file
Regards
Tibor




Theme © iAndrew 2016 - Forum software by © MyBB