in reply to getting mime type from file content

Instead of implementing a potentially expensive and in all likelihood unreliable method of figuring out which is which, why not store the MIME type in the database?

HTH

  • Comment on Re: getting mime type from file content

Replies are listed 'Best First'.
Re: Re: getting mime type from file content
by Anonymous Monk on Nov 30, 2001 at 03:31 UTC
    Shouldn't be expensive. I would be happy to just get the output from the unix file command. That would be enough to create a mime type. The file command is fast enough for me. It's too bad I can't do this with the file command `echo hello | file`