Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Why do I want to do this? I have binary and text data stored in a database. I don't have the file extension. I need to send a correct http header. Anyone got any ideas?$file_data = # ascii or binary data $mime_type = get_mime_type($file_data);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: getting mime type from file content
by Moonie (Friar) on Nov 30, 2001 at 03:26 UTC | |
by Anonymous Monk on Nov 30, 2001 at 03:39 UTC | |
|
Re: getting mime type from file content
by arturo (Vicar) on Nov 30, 2001 at 03:18 UTC | |
by Anonymous Monk on Nov 30, 2001 at 03:31 UTC |