0

On my XAMPP server I have PyroCMS installed. Version 2.1.4 to be exact. When I go to upload files via the file browser in the admin page it will work. I installed the same version on my hosting platform and whenever I go to upload a PNG file it won't work. This is the error I get:

The filetype you are attempting to upload is not allowed.

I checked the file size limits and changed them to no avail. I was then told I should check the mime type of the image and see if that type is in the CodeIgniter mime type declarations. I did that and it came back as: image/png. Which was in fact in the declaration in and array with image/x-png. Does anyone have an idea of what's going on here? PNG is in the allowed file types and I am well out of ideas...

b28c92e5ff1
  • 489
  • 1
  • 4
  • 17

1 Answers1

2

I fixed it. Adding text/plain as a MIME type to the PNG array in CodeIgniter fixed it.

b28c92e5ff1
  • 489
  • 1
  • 4
  • 17
  • Where is this "Codeigniter" Mimes file in PyroCMS? Do you mean the PyroCMS Mimes in /system/cms/config/mimes.php and not /system/codeigniter/? I cant find a "codeigniter" mimes in /system/codeigniter/. – Laurence Cope Sep 16 '13 at 11:41
  • Don't worry about it. It was a system specific bug. Plus, this was on an outdated version of PyroCMS. – b28c92e5ff1 Sep 16 '13 at 23:20
  • Ok, but this issue still exists in 2.1. and 2.2 for .ico files. I found out the Upload class in the Pyro CI checks images for only a few certain extensions, and fails the upload. .ico and svg are not in this list so they dont upload. Have reported this on Github https://github.com/pyrocms/pyrocms/issues/2801 – Laurence Cope Sep 18 '13 at 09:41