HTTP::File

Routines to deal with HTML input type file.
Download

HTTP::File Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Terrence Brannon
  • Publisher web site:
  • http://search.cpan.org/~tbone/

HTTP::File Tags


HTTP::File Description

Routines to deal with HTML input type file. HTTP::File is a Perl module that offers routines to deal with HTML input type file.SYNOPSISCGI.pm examplesavepage.html looks like this:< H1 >Upload a webpage< /H1 >< FORM METHOD=POST ENCTYPE="multipart/form-data" action="/cgi-bin/webplugin/savepage.cgi" >< INPUT TYPE=file name=FILE_UPLOAD size=35 >< INPUT TYPE=submit NAME=Action VALUE="Upload Ahoy!" >< /FORM >savepage.cgi looks like this:#!/usr/bin/perluse CGI; use HTTP::File;$cgi = new CGI;$upload_path='/tmp';$raw_file = $cgi- >param('FILE_UPLOAD'); $basename = HTTP::File::upload($raw_file,$upload_path);print $cgi- >header; print $cgi- >start_html;print "$basename upload successfully.< BR >Upload path: "; print $upload_path ? $upload_path : '/tmp';print $cgi- >end_html;HTML::Mason example< FORM METHOD=POST ENCTYPE="multipart/form-data" action="receive-upload.html" > < INPUT TYPE=file name=PHOTO_FILE size=35 > < /FORM >... then in receive-upload.html< %init > use HTTP::File; < /%init >< %perl > $output_path="/var/spool"; $raw_file=$ARGS{PHOTO_FILE}; HTTP::File::upload($raw_file, $output_path); < /%perl > Requirements: · Perl


HTTP::File Related Software