The upload feature still does not work... You got it half way working... it uploads it, it just uploads it into an empty text file with the name of it as 4502190. The actual name of the file is 1.html.
Oct 28, 1998, 10:33 AM
Administrator (9387 posts)
Oct 28, 1998, 10:33 AM
Post #4 of 7
Views: 5673
It's the same one that is on the web, so my guess would be that you are using a really old version of CGI.pm that doesn't support file uploads. To find out what version of cgi.pm you are using try:
#!/usr/bin/perl
use CGI;
my $in = new CGI;
print $in->header();
print CGI::VERSION;
print "<br>done!";
and see what it says.
Hope that helps,
Alex
#!/usr/bin/perl
use CGI;
my $in = new CGI;
print $in->header();
print CGI::VERSION;
print "<br>done!";
and see what it says.
Hope that helps,
Alex
Oct 28, 1998, 12:51 PM
Novice (7 posts)
Oct 28, 1998, 12:51 PM
Post #5 of 7
Views: 5671
you guys are lying.... You never onced changed that script... My company had to completly re-do the cgi. Horrible just horrible.
Everyone if you want the fix to the cgi head over to http://www.websworks.com/cgi/fix
I set this up to help everyone..
Gossamer Threads if you need help debugging your cgi-scripts I have the perfect company. email me let me know!
Btw- it has nothing to do with the cgi.pm version! It should work either way!
Good luck and I hope everyone visits the page on how to fix it....
Everyone if you want the fix to the cgi head over to http://www.websworks.com/cgi/fix
I set this up to help everyone..
Gossamer Threads if you need help debugging your cgi-scripts I have the perfect company. email me let me know!
Btw- it has nothing to do with the cgi.pm version! It should work either way!
Good luck and I hope everyone visits the page on how to fix it....
Oct 28, 1998, 1:21 PM
Novice (16 posts)
Oct 28, 1998, 1:21 PM
Post #6 of 7
Views: 5672
I found the problem!!!
Around line 191 SHOULD be
var fileName = window.document.Upload.data.value.toLowerCase();
Around like 529 SHOULD be:
<input name=data type=file onBlur="serverFileName()"><br>
Now, it works
Apparently they never fixed the script at all. ARGH!
-Cheers,
RJW
Around line 191 SHOULD be
var fileName = window.document.Upload.data.value.toLowerCase();
Around like 529 SHOULD be:
<input name=data type=file onBlur="serverFileName()"><br>
Now, it works
Apparently they never fixed the script at all. ARGH!
-Cheers,
RJW
Oct 31, 1998, 6:43 AM
Administrator (9387 posts)
Oct 31, 1998, 6:43 AM
Post #7 of 7
Views: 5673
Randy Jae is right with the fix. It was a naming problem, the script was calling the file upload variable "file" on the form and thinking it was "data" in the script. Changing the lines above fixes the problem.
I've double checked that the one on the web is the latest version with the changes. It was an awful source control problem.
On your fix you still call the variable "file", so unless you changed:
($file_space, $result) = &upload ($dir, $in->param('data'), $filename, $disk_space[0]);
to:
($file_space, $result) = &upload ($dir, $in->param('file'), $filename, $disk_space[0]);
in the script I'm not sure how that would fix the problem. Also, I'm not sure why you would have to rewrite the entire cgi script?
Cheers,
Alex
I've double checked that the one on the web is the latest version with the changes. It was an awful source control problem.
Quote:
Everyone if you want the fix to the cgi head over to http://www.websworks.com/cgi/fixOn your fix you still call the variable "file", so unless you changed:
($file_space, $result) = &upload ($dir, $in->param('data'), $filename, $disk_space[0]);
to:
($file_space, $result) = &upload ($dir, $in->param('file'), $filename, $disk_space[0]);
in the script I'm not sure how that would fix the problem. Also, I'm not sure why you would have to rewrite the entire cgi script?
Cheers,
Alex