Shahar Evron
2008-05-30 15:11:01 UTC
Hi,
I was going to write a general purpose mime-type detection method. Right
now I use mime_magic to detect uploaded file's MIME type in
Zend_Http_Client but mime_magic is deprecated in favor of the fileinfo
extension.
Since both might or might not be available, and fileinfo is prefered, I
was going to write a wrapper function that would use fileinfo if
available, then mime_magic and if none are available, will do nothing.
I figure that this might be useful for other ZF components, and also for
users, and the most natural place for it is some static method of
Zend_Mime.
Any thoughts or better suggestions?
Shahar.
I was going to write a general purpose mime-type detection method. Right
now I use mime_magic to detect uploaded file's MIME type in
Zend_Http_Client but mime_magic is deprecated in favor of the fileinfo
extension.
Since both might or might not be available, and fileinfo is prefered, I
was going to write a wrapper function that would use fileinfo if
available, then mime_magic and if none are available, will do nothing.
I figure that this might be useful for other ZF components, and also for
users, and the most natural place for it is some static method of
Zend_Mime.
Any thoughts or better suggestions?
Shahar.
--
Best Regards,
Shahar Evron <shahar.e-C1q0ot2/***@public.gmane.org>
Senior PHP Specialist Product Group
Zend Technologies
Best Regards,
Shahar Evron <shahar.e-C1q0ot2/***@public.gmane.org>
Senior PHP Specialist Product Group
Zend Technologies