LameNerd has asked for the wisdom of the Perl Monks concerning the following question:
Where sendit looks like this:system ( 'unix2dos file2upLoad.unix > file2upload.dos' ); sendit ( 'file2upload.dos', $browser );
But here's my question:sub sendit { my $local_filename = shift; my $browser = shift; my $remote_filename; my $local_filesize; my $text; my $request_number = 0; $local_filesize = -s $local_filename; $remote_filename = basename($local_filename); unless ($local_filesize > 0) { if ($debug_level > 0) { print "\nSendfile Error: $local_filename not found"; } return 0; } my $resp = $browser->post("$url/Upload", [ 'UploadFile' => [ $local_filename , $remote_filename , 'Content_Type' => "application/x-zip-compressed" ], 'Submit' => 'Send Request File' ], 'Content_Type' => 'form-data' ... );
... to something like text/ascii?'Content_Type' => "application/x-zip-compressed"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Uploading Unix text to IIS 5.0 Web Server with LWP?
by theorbtwo (Prior) on Jun 12, 2003 at 19:25 UTC | |
by LameNerd (Hermit) on Jun 12, 2003 at 21:00 UTC | |
by theorbtwo (Prior) on Jun 12, 2003 at 21:18 UTC |