Image upload - file type not allowed!? |
[eluser]Unknown[/eluser]
Hiya, I am using code igniters file upload class to add jpgs, gifs and pngs to my site cms. I have follwed the tutorial set out in the user guide here to the letter and I am getting the error message that the file type I have chosen is not allowed even though it clearly should be. I have tested this on another computer and got it working fine, however when uploaded to the server it does not work. The only thing I have done differently is that I am using a .htaccess file to remove the ‘index.php’ from my URI. This is my .htaccess code which I got from the codeigniter wiki and which works fine Code: <IfModule mod_rewrite.c> Has anyone had this problem as well or if anyone can suggest a solution it would be greatly appreciated. Thanks
[eluser]Rick Jolly[/eluser]
I had the same problem with jpegs until I added a mime type. I'm not sure if you're having the same problem, but you might want to look at this: http://codeigniter.com/bug_tracker/bug/1935/ If the fix works for you, then you might want to add a comment to that bug report so that it might get confirmed.
[eluser]Jamongkad[/eluser]
Could we see a snippet of your code? perhaps we could find something there.
[eluser]Roger Glenn[/eluser]
I was getting the same filetype error when uploading JPG's, although the file was actually uploading successfully. After adding the additional 'image/jpg' element to the jpeg, jpg and jpe mime types as suggested in http://codeigniter.com/bug_tracker/bug/1935/ the system stopped throwing the error. |
Welcome Guest, Not a member yet? Register Sign In |