I would not trust file extensions; File::MMagic seems to me a better solution; here is an untested snippet:
use File::MMagic; $mm = new File::MMagic; # use internal magic file # disable checks made against file extension $mm->removeFileExts; $type = $mm->checktype_filename("/somewhere/unknown/file"); ...
$type will contain a MIME mediatype string.
HTH, Valerio
In reply to Re: Re: Re: Thoughts on file upload...
by valdez
in thread Thoughts on file upload...
by mojobozo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |