in reply to Re: Re: Thoughts on file upload...
in thread Thoughts on file upload...

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

Replies are listed 'Best First'.
Re: Re: Re: Re: Thoughts on file upload...
by mojobozo (Monk) on Nov 20, 2002 at 18:49 UTC
    I'm not familiar with that. I'll look into it.

    Thanks!
    _____________________________________________________
    mojobozo
    word (wûrd)
    interj. Slang. Used to express approval or an affirmative response to
    something. Sometimes used with up. Source