NYCPHP Meetup

NYPHP.org

[nycphp-talk] Determining mime type of data not a file

Scott Mattocks scott at crisscott.com
Wed Jan 25 10:37:42 EST 2006


Chris Merlo wrote:
> On 1/25/06, Scott Mattocks <scott at crisscott.com> wrote:
> 
> 
>>I am looking for a way to determine the mime type of an image that is
>>held in memory and does not come from a file.
> 
> Scott:
> If that cache class is something you wrote, just add a mimeType data field
> to it, and store the mime type when you cache the image.  (If it's not, then
> my apologies for not being all that familiar with the PEAR repositories.)

The cache class is an in house class that I can't really mess with. It 
holds a lot of other types of data besides images and we want it to stay 
as generic as possible.

Unless I am confused, the mime type isn't a property of the file it is a 
property of the data. So I don't see why all of the mime type functions 
and classes that I have found only work on files.

Thanks,
Scott



More information about the talk mailing list