T
TCook
Hey All,
I have the following HTML:
' <form id="htmlupload" enctype="multipart/form-data" method="post"
action="C:\Inetpub\wwwroot\FileUpload\upload.pl"
' <br>
' <INPUT type="file" name="htmlupload" value="G:\Satuit CRM\HTML
Docs\Satuit IE Automation Prototype.doc">
' <br>
' <INPUT type="submit" value="Upload Default File" name="Upload via HTMl">
' </form>
And I have the following CGI script:
#!/usr/bin/perl
use CGI;
my $cgi = new CGI;
my $dir = $cgi->param('dir');
my $file = $cgi->param('file');
$file=~m/^.*(\\|\/)(.*)/; # strip the remote path and keep the filename
my $name = $2;
open(LOCAL, ">$dir/$name") or die $!;
while(<$file>) {
print LOCAL $_;
}
print $cgi->header();
print "$file has been successfully uploaded... thank you.\n";
Why won't the file upload? Why won't the default value get used?
Thanks & Regards,
TC
I have the following HTML:
' <form id="htmlupload" enctype="multipart/form-data" method="post"
action="C:\Inetpub\wwwroot\FileUpload\upload.pl"
' <br>
' <INPUT type="file" name="htmlupload" value="G:\Satuit CRM\HTML
Docs\Satuit IE Automation Prototype.doc">
' <br>
' <INPUT type="submit" value="Upload Default File" name="Upload via HTMl">
' </form>
And I have the following CGI script:
#!/usr/bin/perl
use CGI;
my $cgi = new CGI;
my $dir = $cgi->param('dir');
my $file = $cgi->param('file');
$file=~m/^.*(\\|\/)(.*)/; # strip the remote path and keep the filename
my $name = $2;
open(LOCAL, ">$dir/$name") or die $!;
while(<$file>) {
print LOCAL $_;
}
print $cgi->header();
print "$file has been successfully uploaded... thank you.\n";
Why won't the file upload? Why won't the default value get used?
Thanks & Regards,
TC