[horde] Confused about MIME mappings comments in FRAMEWORK_3
Kevin Myer
kevin_myer at iu13.org
Tue Jul 19 08:20:59 PDT 2005
I wanted to add a MIME type to a mapping (somewhere) so that it is recognized as
a MS Word document. I had't figured out exactly where to do that so I started
poking around in the code. In the FRAMEWORK_3 CVS code, there is a
horde/scripts/mime_mapping/ folder that isn't present in any releases, but its
referenced in horde/lib/Horde/MIME/mime.mapping.php in release code, as the way
to update MIME mappings. Is that just some carryover comments from HEAD?
After doing some more searching, I found the place to make the change is in the
obvious place of horde/config/mime_drivers.php. Added the MIME type there and
problem fixed.
So, perhaps a silly question on top of this: there's code to determine a file's
type, through either the MIME type or using MIME magic (which is where I was
originally poking). There's code to invoke a driver for a particular MIME
type(s), hardcoded in horde/config/mime_drivers.php. Why not invoke a driver,
based on the results of either invoking MIME magic, or MIME mapping to
determine a file type, instead of using hardcoded MIME mapping values?
Kevin
--
Kevin M. Myer
Senior Systems Administrator
Lancaster-Lebanon Intermediate Unit 13 http://www.iu13.org
More information about the horde
mailing list