NAME
CGI::Lite::Request::Upload - Upload objects for CGI::Lite
SYNOPSIS
$upload = CGI::Lite::Request::Upload->new;
# getters
$upload->filename;
$upload->tempname;
$upload->size;
$upload->type;
# copy and hard link
$upload->copy_to('/target/path');
$upload->link_to('/target/path');
$fh = $upload->fh;
$content = $upload->slurp;
DESCRIPTION
These objects are created automatically during the parse
of the incoming request by CGI::Lite::Request, and shouldn't be instantiated directly.
METHODS
- new
-
simple constructor
- filename
-
returns the filename of the uploaded file
- tempname
-
returns the name of the temporary file to which the content has been spooled
- size
-
returns the size of the uploaded file
- type
-
returns the MIME type of the file (guessed with File::Type)
- copy_to('/path/to/destination')
-
copies the file to the destination
- fh
-
returns an IO::File object with the temporary file opened read only
- link_to('/path/to/destination')
-
links the temporary file to the destination
- slurp
-
reads and returns the contents of the uploaded file
AUTHOR
Richard Hundt <richard NO SPAM AT protea-systems.com>
SEE ALSO
CGI::Lite, File::Type, CGI::Lite::Request, IO::File
LICENCE
This library is free software and may be used under the same terms as Perl itself
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 139:
You forgot a '=back' before '=head1'