Click to See Complete Forum and Search --> : Perl/CGI File Uploading


brockmasterflex
05-13-2003, 08:49 AM
Hey all,

I'm really beginning to dig perl, its a great language! I was wondering how hard is it to upload a file using HTML/CGI. I'm in the process of editing a mailman module and I need to upload a file containg email addresses.

Just wondering if someone can point in the right direction.

Thanks y'all,
brock

DragonHead
05-13-2003, 09:18 AM
I'm a big fan of CGI.pm (mod-perl).

sub print_upload
{

print $q->start_multipart_form(),

$q->filefield(-name=>'upload',
-size=>50,
-maxlength=>80),

$q->br(),

$q->submit(-name=>'submit',
-style=>"font-size:xx-small",
-value=>'Submit'),

$q->td($q->button(-name=>'close', -value=>"Close",
-style=>"font-size:xx-small",
-onClick=>'self.close()' )),

$q->end_form();
}

----

Btw, all formating is lost by iconboards, so it looks sloppy.

iDxMan
05-14-2003, 12:35 AM
That's what the [ code ] tags are for.


sub print_upload
{

print $q->start_multipart_form(),
#.....