mardi 10 mars 2015

Codeigniter: upload not allowed (filetype not allowed / redux)


Vote count:

0




First of all, there are already a lot of (solved) questions regarding this topic. And I tried all possible solutions. But to no avail.



  • The problem occurs in both CI versions 2.1.4 and 2.2.1.

  • I also tried using different filetypes, such as png,gif and txt.

  • I've done no mime-type alterations, eg. by using AddType in the .htaccess file

  • I've used a simple html form, and a Postman for debugging

  • I've tried it with both PHP versions 5.5 and 5.6 (fileinfo module enabled)

  • The mime types do exist in the mimes.php file

  • The tmp folder is writable


I'm out of options...

Does anybody know what the issue might be?


Thanks in advance!




configuration



$this->uploadconfig = array(
'upload_path' => "./tmp/",
'allowed_types' => "png|gif|txt",
'overwrite' => TRUE,
'max_size' => "25000KB",
'max_height' => "5000",
'max_width' => "5000"
);
$this->load->library('upload', $this->uploadconfig);


error



The filetype you are attempting to upload is not allowed.


output



[file_name] => test.png
[file_type] => image/png
[file_path] => /CORRECT_SERVER_PATH/tmp/
[full_path] => /CORRECT_SERVER_PATH/tmp/test.png
[raw_name] => test
[orig_name] =>
[client_name] => test.png
[file_ext] => .png
[file_size] => 851
[is_image] => 1
[image_width] =>
[image_height] =>
[image_type] =>
[image_size_str] =>


asked 28 secs ago







Codeigniter: upload not allowed (filetype not allowed / redux)

Aucun commentaire:

Enregistrer un commentaire