[ansel] MIME Magic gives wrong extension

Jan Schneider jan at horde.org
Sun Jan 16 06:10:39 PST 2005


Zitat von Richard Wallace <rwallace at thewallacepack.net>:

> In Ansel_Gallery::getVFSName() the call to 
> MIME_Magic::MIMEToExt()$type) returns
> jpe for JPEG images.  I found that if I simply change the ordering in
> Horde/MIME/mime.mapping.php for image/jpeg types to put 'jpg' => 'image/jpeg'
> above other types of jpeg images that it works fine.  Is there a 
> better way to
> do this?

No, this is exactly what I do regularly after the mime mapping database has
been updated.

> I had hoped that maybe if I installed the fileinfo PHP and PECL extensions.
> Unfortunately, my efforts to do this on FreeBSD have fallen short for 
> now.  If
> anyone has suggestions on the best way to go about doing this I would greatly
> appreciate it.  Or if you have an idea on how better to solve the problem of
> the wrong extension type that would be great too.

This is completely unrelated to the problem above. But as a side note, I
consider dropping fileinfo support, as almost noone (including me) is able
to install this extension, and it looks a bit abandoned.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/


More information about the ansel mailing list