[TYPO3-core] RFC: add a mehtod to determine the MIME Type of a file to t3lib_div

Ingo Renner typo3 at ingo-renner.com
Wed Feb 21 13:35:16 CET 2007


Hi *,

This is a patch request.

Branches: trunk

Problem:

A method to determine the MIME type of a file is needed from time to  
time, but is not available where one would expect it.

Solution:

Add a method getMimeType() to t3lib_div. The current alternative code  
for PHP's native function is taken from t3lib_htmlmail.

Notes:

There are several methods in TYPO3 to do this already they all could  
be consolidated to the new method.
As we set the PHP version requirement to 4.3.0+ we could just use  
this method as a pure wrapper for PHP's function mime_content_type().
Alternatively this method could be added to t3lib_basicfilefunc or  
t3lib_extfilefunc


Ingo


-------------- next part --------------
A non-text attachment was scrubbed...
Name: getMimeType.diff
Type: application/octet-stream
Size: 1501 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20070221/c5512311/attachment.obj 


More information about the TYPO3-team-core mailing list