Welcome Guest, Not a member yet? Register   Sign In
[SOLVED]Upload Class - You have not specified any allowed file types.
#1

[eluser]stuffradio[/eluser]
I'm getting these two errors:

"You have not specified any allowed file types.

The filetype you are attempting to upload is not allowed."

Here is my code:

Code:
$config['upload_path'] = "system/application/views/photos/";
            $config['allowed_type'] = "jpeg|gif";
            $config['overwrite'] = 'false';
            $config['max_size'] = '1000';
            $config['max_width'] = '723';
            $config['max_height'] = '489';
            
            $this->load->library('upload', $config);
Why is this happening? I really don't get it. I tried in IE and FF and it won't work.
#2

[eluser]Michael Wales[/eluser]
What type of file are uploading? Make sure your server is parsing out the MIME types correctly for the file you are uploading - check the file_type key of the array returned from the Upload class' data() method. If it's returning something odd, you may need to add it to the accepted MIME types for that file extension within config/mimes.php


Edit - oh yeah, it's - not the plural:
Code:
$config['allowed_types']
#3

[eluser]stuffradio[/eluser]
I'm trying to upload .jpg and .gif files

Edit: Thank you, that solved my problem!
#4

[eluser]Michael Wales[/eluser]
Did you change the typo I pointed out - does it work now? Did you make any of the changes I recommended?
#5

[eluser]stuffradio[/eluser]
Yes, I just read what you posted and my typo worked!




Theme © iAndrew 2016 - Forum software by © MyBB