Filenames when uploading
Alex Schajer (alex@computing.emap.com)
Wed, 13 Aug 1997 09:10:06 +0100 (BST)
Hi,
I'm using a piece of code from the CGI_Lite documentation within LWP to
upload files through an HTML form onto my webserver. It works! and I'm
really happy except I don't understand why and also the file names aren't
quite right.
Could someone tell me
a) how it works, and also how CGI_Lite works in general, or a place to go
and look for info.
b) how to change the filenames from
871405081__sumo.gif to just sumo.gif ?
Thanks, here's my code:
#!/usr/bin/perl
$| = 1;
print "Content-type: text/plain\n\n";
use CGI_Lite;
$form = new CGI_Lite();
$form->set_platform ("UNIX" or "PC" or "Macintosh");
$form->set_file_type ("handle" or "file");
$status = $form->set_directory ("/www/documents/alex/ba");
$form->set_directory("/www/documents/alex/ba") || die "Directory doen't
exist.\n";
$reference_to_hash = $form->parse_form_data();
%hash = $form->parse_form_data();
$form->print_form_data;
Alex