1

Is it possible to add additional mime types to the $mimes array (/system/expressionengine/config/mimes.php) from the config.master.php when using the Focus Lab config setup?

I really don't want to start changing files in the expressionengine directory to have it potentially be skipped when upgrading EE core software. Need to add in mime types for kml/kmz files.

2

The Focus Lab config will only override variables in config.php and database.php by default. You could add an additional require xxx/config.master.php to mimes.php if you wanted to, but since that requires editing the file anyway, and it unnecessarily complicates things, you're better off just adding the new mime types directly.

// Custom mime types
'kml'   =>  'application/vnd.google-earth.kml+xml',
'kmz'   =>  'application/vnd.google-earth.kmz'

I'd suggest also submitting a support request/bug report/email to EL requesting that those mime types are included in future releases.

| improve this answer | |
  • Pretty much what I do as well. Since that file is just a big old array, I keep a version of it in a repo and I update it every time I encounter a mime type that's not in there. – Jérôme Coupé Feb 20 '13 at 16:07
0

Not sure if this will work, only guessing:

$env_config['mimes'] = array(
    'kml' => 'whatever'
);
| improve this answer | |
  • I'd need to check and see if doing that adds to the existing array, or replaces it. – Brendan Underwood Feb 20 '13 at 1:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.