| Alonze Woodfield 2006-06-17, 7:56 am |
| Hello,
Thank you in advance for reading this. I am trying to upload several
files at once via seperate filefields. What is strange is that if I
have more than 1 per form, and submit, then if the two filefields have
different files, neither shows up with an upload() call. If I only
attempt to upload one file at a time, or specify the same file for all
filefields, it works fine. The filefields are all named separately, and
if I specify a file in the second but not the first, my logfile
reflects this.
In other words:
file A specified, no file B specified - works
file A specified, file B identical to A - works
file A unspecified, file B specified - works
file A specified, file B specified - doesn't work, both upload values
are empty
I am on why I cannot specify more than one different file in
my form. I am using XP as a platform. Any help would be greatly
appreciated! Thanks so much!
My two corresponding pieces of code follow:
print $q->start_multipart_form(
-name => 'main_form1');
print 'Enter a filename, or click on the browse button to choose one:
',
$q->filefield(
-name => 'filename1',
-size => 40,
-maxlength => 80);
print $q->hr;
print 'Enter a filename, or click on the browse button to choose one:
',
$q->filefield(
-name => 'filename2',
-size => 40,
-maxlength => 80);
print $q->hr;
print $q->submit(-value => 'Upload the file');
print $q->end_form;
..........................................................................
my $query = new CGI;
print OUT "FIRST FILENAME IS ...".$query->upload('filename1')."... AND
SECOND FILENAME IS ...".$query->upload('filename2')."...";
|