Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.1

Request #13646 Default to Mime Type based on Extension
Submitted: 2008-04-10 20:50 UTC
From: mrtwice99 Assigned: cweiske
Status: Closed Package: MIME_Type (version 1.0.0)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 50 - 46 = ?

 
 [2008-04-10 20:50 UTC] mrtwice99 (Randy Syring)
Description: ------------ Could you extend this class to use a file extension based lookup as the default method instead of failing if the other methods don't work? You could get the list of mime types / extensions from the file associated with the Apache web server. I have attached a patch giving this support.

Comments

 [2008-08-03 08:38 UTC] cweiske (Christian Weiske)
The manual detection would need to be in an own class - not in MIME_Type. It would be cool if you would provide a patch with that, or I'd delay that feature to PEAR2's mime_type package.
 [2008-08-24 06:05 UTC] cweiske (Christian Weiske)
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you.
 [2009-01-14 23:15 UTC] schmidt (Christian Schmidt)
I moved the detection into a class of its own as requested and added a few more extensions. I think this would be a useful feature. I am looking for an extension-to-MIME-type-mapping for use with the Services_Amazon_S3 package. Note that also PHP_Archive and File_Archive implement such a mapping - but if this feature is added to MIME_Type, they can use that instead of maintaining their own mapping.
 [2009-01-16 11:54 UTC] cweiske (Christian Weiske)
Fixed in version 1.2.0