$config['editable_asset_filetypes'] Not Working for Me

edited August 2012 in Bug Reports
I put the following code in my MY_fuel.php file:

$config['editable_asset_filetypes'] = array( 'images' => 'jpg|jpeg|jpe|gif|png|eps|ai|psd', 'pdf' => 'pdf', );

When attempting to upload an EPS file, I get a modal dialog saying it won't allow that. Anything I'm doing wrong?
Erik

Comments

  • edited August 2012
    Is the folder it's uploading to the images folder? I recall there possibly being a bug in the 0.93 version (which is still the master branch on GitHub). I'm assuming it's not the 1.0 beta branch correct?

    If you want to debug further, the logic for this is in the fuel/modules/fuel/module.php controller around line 1440.
  • edited 3:15AM
    Yes, the folder is the images folder. This is not the 1.0 beta branch either, its still 0.93.

    Thanks for the tip
    Erik
  • edited 3:15AM
    Hi,

    Check out comment 3679 at http://www.getfuelcms.com/forums/discussion/comment/3679/#Comment_3679.

    I also had problems with image uploads and the fix to the bug admin is refering to is near the bottom of the thread. Hope this helps.
  • edited August 2012
    Strange, it still doesn't work for me. For the record, I modified fuel/modules/fuel/controllers/module.php to look like this starting at line 1438: (Original line commented out)

    //$config['allowed_types'] = ($this->assets_model->get_dir_filetype($asset_dir)) ? $this->assets_model->get_dir_filetype($asset_dir) : 'jpg|jpeg|png|gif'; $upload_folder = trim(str_replace(assets_server_path(), '', $config['upload_path']), '/'); $config['allowed_types'] = ($this->assets_model->get_dir_filetype($upload_folder)) ? $this->assets_model->get_dir_filetype($upload_folder) : 'jpg|jpeg|png|gif';

    I'm still getting the prompt disallowing any of the non-default image types into the assets/images folder, based on this configuration:

    // Allowed Filetypes $config['editable_asset_filetypes'] = array( 'images' => 'jpg|jpeg|jpe|gif|png|eps|ai|psd', 'pdf' => 'pdf' );
  • edited 3:15AM
    Just discovered also that adding in this editable_asset_filetypes declaration into the MY_fuel.php file is now breaking the ability for me to upload PDF files. Would really appreciate you guys looking at debugging this for me.

    I hope to have a chance to peek at the 1.0 stuff as well, looking forward to it!
  • edited 3:15AM
    What is the $upload_folder value output in the module.php controller?
Sign In or Register to comment.