- SEE ALSO
- COPYRIGHT AND LICENSE
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.
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.
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.
The hard link of the upload file of the work place is temporarily made in LINK_PATH.
Masatoshi Mizuno <firstname.lastname@example.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.