in reply to File::Copy across a Network
As you are running an Apache server and just want to upload files to it all you need to do is write a dozen line CGI script that uses CGI or even easier CGI::Simple to do the file upload. Something like:
#!/usr/bin/perl -w use strict; use CGI::Simple; $CGI::Simple::DISABLE_UPLOADS = 0; # enable uploads $CGI::Simple::POST_MAX = 1_048_576; # allow 1MB uploads my $q = new CGI::Simple; my $target = '/path/to/write/file.name'; $q->param('upload_file') ? upload() : request_file(); exit; sub upload { $q->upload( 'upload_file', $target ); } sub request_file { print $q->header; print <<HTML; <HTML> <BODY> <FORM METHOD="POST" ACTION="http://localhost/cgi-bin/script.cgi"; ENCTYPE="multipart/form-data"> <INPUT TYPE="file" NAME="upload_file" SIZE="42"> </FORM> </BODY> </HTML> HTML }
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: File::Copy across a Network
by Anonymous Monk on May 03, 2002 at 16:23 UTC | |
by tachyon (Chancellor) on May 04, 2002 at 05:40 UTC |