The CGI module can be used for this. Here is a short example which might
(or might not) help. Also check out the perldoc for CGI, or better yet take
a look at the "Official Guide to Programming with CGI.pm", a book published
by Wiley.
<!-- from the HTML form -->
<FORM METHOD="POST" ENCTYPE="multipart/form-data"
ACTION="/cgi-bin/addattach.cgi">
<INPUT TYPE="FILE" NAME="upload">
<INPUT TYPE="SUBMIT" VALUE="ADD FILE">
</FORM>
# the Perl code
use CGI qw(:standard);
my $file = $Request->Param('upload');
unless ( $file ) {
# PUT ERROR HERE
#print "No file uploaded.";
}
my $type = uploadInfo($file)->{'Content-Type'};
# File Name = $file
# File MIME Type = $type
my ($len, $buf, $data);
binmode $file;
while ( my $readlen = read( $file, $buf, 1024 ) ) {
$data .= $buf;
$len += $readlen;
}
# File Length = $len
# File Data = $data
-----Original Message-----
From: Ram�n Ch�vez [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 1:07 PM
To: [EMAIL PROTECTED]
Subject: File Uploading SCRIPT
Hello everyone.
I'm trying to write a script for Uploading pictures.
Can you give me some advice??
What module to look at first??
Thank you.
-rm-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]