Can't Upload a Publisher File?

I've recently created a new asset folder called "templates" and would like to be able to upload templates such as .indd,.pub,.pdf,.png,.jpeg. I've added the necessary MIME types to the mime.php in the config.
'pub'	=>	'application/x-mspublisher'
I've also added the following to MY_fuel.php

$config['editable_asset_filetypes'] = array(
'images' => 'jpg|jpeg|jpe|gif|png|psd|ai|pdf|eps|ps|xls|ppt|tiff|tif|doc|docx|indd|inx|pub',
'pdf' => 'pdf',
'templates' => 'psd|ai|pdf|eps|ps|xls|ppt|jpeg|jpg|jpe|png|tiff|tif|doc|docx|indd|inx|pub',
'media' => 'jpg|jpeg|jpe|png|gif|mov|mp3|aiff|png|psd|ai|pdf|eps|ps|xls|ppt|tiff|tif|doc|docx|indd|inx|pub'
I've also added the following to my templates_model.php file

$fields['file_path_upload'] = array('type' => 'file', 'accept' => 'psd,ai,pdf,eps,ps,xls,ppt,jpeg,pub,jpg,jpe,png,tiff,tif,doc,docx,indd,inx', 'upload_path' => assets_server_path('templates'), 'overwrite' => TRUE);
Finally I've set the following in MY_fuel_module.php

$config['modules']['templates'] = array(
'sanitize_images' => FALSE, // to prevent false positives with xss_clean image sanitation
'sanitize_input' => FALSE
All the other file types seem to work but for some reason the publisher files return with "The filetype you are attempting to upload is not allowed". Any idea what would cause this one filetype to fail?


  • edited 12:25PM
    That error can be thrown in a few places. FUEL has that error message on fuel/modules/fuel/controllers/module.php lines 1447 and 1469. It's also on lines 208 and 231 of the Codeigniter Upload class. Try putting in some debugging code to see where it's getting thrown.
  • edited 12:25PM
    Thanks for the advice! Turns out that the file was coming over with a different mime type then I had set in the mime.php file. Added it to that array and now everything is working great.

    Thank you,
    Brandon Boswell
Sign In or Register to comment.