Well, I've been trying to implement JPDeni's file upload mod.I have been getting 500 server error, but when I run from the command line I get no error in the script provided, file-upload.cgi
I tried the unmodified version and it worked, so I started trying to figure what was wrong. I tried to get the parameters in with a library called cgi-lib.pl using $in{'variable'} but that seems to screw up the file upload data.
Well, what I'm trying to say is that the command that is being rejected by the server when I run the script is
$db_setup = param('db');
that should bring up something that was submitted from the form, that is sent with a post method.
How could I get input from a form using another procedure, but through the post method?
I think that if I could read the variables from the form
<FORM ENCTYPE="multipart/form-data" ACTION="$db_dir_url/file-upload.cgi" METHOD="POST">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
<input type=hidden name="newfilename" value="$rec{$db_key}">
<TABLE BORDER=0 WIDTH="460">
<TR><TD ALIGN=RIGHT>File:</TD>
<TD><INPUT TYPE="FILE" NAME="file-to-upload-01" SIZE="35"></TD></TR>
<TR><TD><INPUT TYPE="SUBMIT" VALUE="Upload File!"></TD>
<TD ALIGN=RIGHT><INPUT TYPE="RESET" VALUE="Reset Form"></TD></TR>
</TABLE>
</FORM>
the problem would be solved.
Thanks for the help!
I tried the unmodified version and it worked, so I started trying to figure what was wrong. I tried to get the parameters in with a library called cgi-lib.pl using $in{'variable'} but that seems to screw up the file upload data.
Well, what I'm trying to say is that the command that is being rejected by the server when I run the script is
$db_setup = param('db');
that should bring up something that was submitted from the form, that is sent with a post method.
How could I get input from a form using another procedure, but through the post method?
I think that if I could read the variables from the form
<FORM ENCTYPE="multipart/form-data" ACTION="$db_dir_url/file-upload.cgi" METHOD="POST">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
<input type=hidden name="newfilename" value="$rec{$db_key}">
<TABLE BORDER=0 WIDTH="460">
<TR><TD ALIGN=RIGHT>File:</TD>
<TD><INPUT TYPE="FILE" NAME="file-to-upload-01" SIZE="35"></TD></TR>
<TR><TD><INPUT TYPE="SUBMIT" VALUE="Upload File!"></TD>
<TD ALIGN=RIGHT><INPUT TYPE="RESET" VALUE="Reset Form"></TD></TR>
</TABLE>
</FORM>
the problem would be solved.
Thanks for the help!