Mimi Cafe wrote:
I need to write a cgi program to enable our users to upload files using the
web browser,

Okay. As Owen mentioned, the module CGI::UploadEasy may be helpful.

but I am not sure how to figure out the type of file the user
wants to upload (e.g text or binary file). Can CGI.pm accomplish this
automatically?

If you need that information before a file is uploaded, the answer is no. CGI.pm (and, consequently, CGI::UploadEasy) does provide MIME type based on the file extension and browser settings _after_ the files have been uploaded, but note that that info is not a reliable way to determine e.g. text or binary.

What's the purpose of your desire to know the file type?

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to