Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
hi all, im in desperate need of help.
im uploading files using cgi.pm and i have 2 things i need
some help on:
1. using
my $file = $q->param('uploaded_file') || error($q,"No file received"); my $file_handle = $q->upload($file);
results in $file_handle being empty..in order to get a file handle i have to use:
my $file_handle = $q->upload('uploaded_file');
which is not what the cgi.pm manual sez!?
2. im in a controled environment and id like to change the name of the file uploaded, but simply changing the $file parameter, results in the file being created(with the new name), but nothing is written to it (file size is 0). if i dont change the name of the file, then it works perfectly.(file is saved with the original name,size and type)
how shall i go about to change the name of the file,before i save it to disk ?
any/all help appriciated
kenneth
kennethj@stud.cs.uit.no
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 1: problem changing name of uploaded file!
by tilly (Archbishop) on Sep 03, 2001 at 23:25 UTC | |
|
Re: problem changing name of uploaded file!
by tachyon (Chancellor) on Sep 03, 2001 at 21:22 UTC | |
|
Re: problem changing name of uploaded file!
by marcus (Scribe) on Sep 03, 2001 at 20:20 UTC | |
|
Re: problem changing name of uploaded file!
by Anonymous Monk on Sep 03, 2001 at 20:03 UTC |