in reply to upload.cgi my script is bugged

You might also want to take a look at the MIME type of the file upload, as well as the file extension using:

$type = $query->uploadInfo($filename)->{'Content-Type'};

Some OSs (pre-X Mac OS for example) rarely use file extensions to signify file types - so it's worth checking if you want to support those users.

My usual method is to believe the file extension if it's there, then back down to the Content-Type, then give up.

Replies are listed 'Best First'.
Re: Re: upload.cgi my script is bugged
by Anonymous Monk on Aug 12, 2002 at 01:22 UTC
    Thanks for your reply Rainer