My codeigniter app suddenly broke today. I didn't work on the upload code and when I tried to upload an image today I suddenly got "The filetype you are attempting to upload is not allowed." Yesterday all was fine.
My config array is:
$config = array(
'file_name' => $data['slug'] .'-'. $key,
'upload_path' => './images',
'allowed_types' => 'gif|jpg|jpeg|png'
);
I have also tried to set allowed types as : 'image/gif|image/jpg|image/jpeg|image/png' but no luck.
The dumping $this->upload->data() :
Array
(
[file_name] => ring.jpg
[file_type] => image/jpeg
[file_path] => /home/user/www.domain.ca/images/
[full_path] => /home/user/www.domain.ca/images/ring.jpg
[raw_name] => ring
[orig_name] =>
[client_name] => ring.jpg
[file_ext] => .jpg
[file_size] => 49158
[is_image] => 1
[image_width] =>
[image_height] =>
[image_type] =>
[image_size_str] =>
)
I understand that there were some bugs in previous versions of CI, but I didn't have these issues yesterday. I also understand that this error only occurs if the MIME type does not match what is allowed, but that does not seem to be the case.
The server is Apache.
Does anyone have any idea what could be the problem? Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…