Egg::Request::Upload - Base class for file upload.
use Egg qw/ Request::Upload /; # Acquisition of up-loading object. my $upload= $e->request->upload('upload_param_name');
This is a base class for the file upload.
The plugin to use this module is prepared.
Please load Egg::Plugin::Request::Upload to use it.
Whether the plugin is used in the mod_perl environment is distinguished and the best following subclasses are read.
Egg::Request::Upload::ModPerl, Egg::Request::Upload::CGI,
Please set environment variable 'POST_MAX' to the high limit setting of the size of the upload file.
Please set environment variable 'TEMP_DIR' temporarily to set passing the work file.
Please refer to the document of mod_perl and CGI.pm for details for the environment variable.
Constructor.
The Egg::Request object is received with REQUEST_CONTEXT.
When $e->request->upload is called, this method is internally called.
When any REQUEST_CONTEXT->r->upload(PARAM_NAME) doesn't return it, undefined is returned.
my $upload= $e->request->upload( ...... ) || die 'There is no upload file.';
The file steering wheel to the preservation place of the up-loading file is temporarily returned.
my $value= join '', $upload->handle->getlines;
Alias = fh
Only the file name that doesn't contain the directory path of the upload file is returned.
my $filename= $upload->catfilename;
The upload file of the work place is temporarily copied to COPY_PATH.
$upload->copy_to("/path/to/upload/$filename");
The hard link of the upload file of the work place is temporarily made in LINK_PATH.
$upload->link_to("/path/to/upload/$filename");
Egg::Release, Egg::Request, Egg::Request::Upload, Egg::Request::Upload::CGI, Egg::Request::Upload::ModPerl, Egg::Plugin::Request::Upload, Class::Accessor::Fast,
Masatoshi Mizuno <lushe@cpan.org>
Copyright (C) 2008 Bee Flag, Corp. <http://egg.bomcity.com/>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install Egg::Release, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Egg::Release
CPAN shell
perl -MCPAN -e shell install Egg::Release
For more information on module installation, please visit the detailed CPAN module installation guide.