The filetype you are attempting to upload is not allowed.
Hi,
Since I updated my Fuel-CMS to 1.4 I get this error when I try to upload an asset.
Can you please point me in the right direction to fix this problem.
https://screencast.com/t/Md8GQdLnCdBzThanks,
Jeroen
Comments
$config['editable_asset_filetypes'] = array( 'images' => 'jpg|jpeg|jpe|gif|png|zip|svg', 'pdf' => 'pdf|zip', 'media' => 'mov|mp3|aiff|mpeg|zip', 'assets' => 'jpg|jpeg|jpe|png|gif|mov|mpeg|mp3|wav|aiff|pdf|css|zip|svg' );
Also, the fuel/application/config/mimes.php may not have the correct mapping for the file you are uploading. I sometimes directly debug that in the CI Upload class looking at the file_type property.
I've pasted the snippet above in both MY_fuel.php and fuel/config/fuel.php.
Still the same. How can I debug the CI Upload class.
and the allowed_types are: array(7) { [0]=> string(3) "jpg" [1]=> string(4) "jpeg" [2]=> string(3) "jpe" [3]=> string(3) "gif" [4]=> string(3) "png" [5]=> string(3) "zip" [6]=> string(3) "svg" }
If I set the $ignore_mime to TRUE then the file will upload.
Will this be a security risk?
I just got this same thing with the latest version of Fuel. Once I changed /fuel/codeigniter/libraries/Upload.php line 883 to:
public function is_allowed_filetype($ignore_mime = TRUE)
It worked fine.
It returns false at the last return which means no conditions turn it to true in that method.
@edival TQ. Now it's working fine
In libraries/Upload.php below code is there
public function is_allowed_filetype($ignore_mime = FALSE)
Just I remove FALSE and changed TRUE
public function is_allowed_filetype($ignore_mime = TRUE)