CodeIgniter Forums
Upload library class BUG - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Upload library class BUG (/thread-46976.html)

Upload library class BUG - El Forum - 11-22-2011


We tested the upload class and seems is not working correct.

When we set allowed file types is NOT working.

The library seems that not set the file_type

Here is the problem i think.
// Fall back to the deprecated mime_content_type(), if available
     if ( function_exists('mime_content_type') )

      $this->file_type = mime_content_type($file['tmp_name']);

I replaced:
$this->file_type = mime_content_type($file['tmp_name']);
$this->file_type = $file['type'];

and working.

Any fixes?