L
Lyall
I have an asp web page where I can upload a file to the web server
using a browswer
I have a Perl script which is able to post a file to a Perl based
upload web page (CGI) but does not work with the ASP page.
Would someone kindly point me in the right directory to write my perl
robot to be able to post to the ASP page?
The upload page is similar to this... (this is my CGI one that works)
<html>
<head></head>
<body>
<form action="Upload.pl" method="post" enctype="multipart/form-data">
Application Group: <input type="text" name="ApplicationGroup">
<br/><br/>
Processing Option: <input type="text" name="ProcessOption">
<br/><br/>
File to Upload: <input type="file" name="UploadFile">
<br/><br/>
<input type="submit" name="Submit" value="Upload">
</form>
</body>
</html>
My robot is basically using LWP::RobotUA->post() [newlines dont show
well here I think]
my $postResponse =
$robotUA->post("http://$hostToUploadTo_Global:$port...ption_Global\&NewFileName=$newFileName_Global",
Content_Type => 'form-data',
Content => [
ApplicationGroup => "$applicationGroup_Global",
ProcessOption => "$processingOption_Global",
UploadFile => "$fileToUpload",
NewFileName => "$newFileName_Global",
Submit => "Upload",
UploadFile => ["$fileToUpload"]
]
);
I end up with an empty file being created on the IIS server, rather
than the file containing the data!
Any help would be gratefully received.
....Lyall
using a browswer
I have a Perl script which is able to post a file to a Perl based
upload web page (CGI) but does not work with the ASP page.
Would someone kindly point me in the right directory to write my perl
robot to be able to post to the ASP page?
The upload page is similar to this... (this is my CGI one that works)
<html>
<head></head>
<body>
<form action="Upload.pl" method="post" enctype="multipart/form-data">
Application Group: <input type="text" name="ApplicationGroup">
<br/><br/>
Processing Option: <input type="text" name="ProcessOption">
<br/><br/>
File to Upload: <input type="file" name="UploadFile">
<br/><br/>
<input type="submit" name="Submit" value="Upload">
</form>
</body>
</html>
My robot is basically using LWP::RobotUA->post() [newlines dont show
well here I think]
my $postResponse =
$robotUA->post("http://$hostToUploadTo_Global:$port...ption_Global\&NewFileName=$newFileName_Global",
Content_Type => 'form-data',
Content => [
ApplicationGroup => "$applicationGroup_Global",
ProcessOption => "$processingOption_Global",
UploadFile => "$fileToUpload",
NewFileName => "$newFileName_Global",
Submit => "Upload",
UploadFile => ["$fileToUpload"]
]
);
I end up with an empty file being created on the IIS server, rather
than the file containing the data!
Any help would be gratefully received.
....Lyall