Egg::Plugin::Upload - The file uploading is supported.
package [MYPROJECT]; use strict; use Egg qw/-Debug Upload/; if ( my $upload= $e->request->upload('field_name') ) { my $filename= $upload->catfilename; # It copies it to an arbitrary place. $upload->copy_to( "/path/to/save/$filename" ); }
Request driver behavior can be adjusted by setting TEMP_DIR, POST_MAX etc.
upload and uploads are added as a method of Egg::Request.
The upload object specified by [FIELD_NAME] is returned.
Undefined returns if there is no specified upload.
my $upload= $e->request->upload( 'upload_name' );
The upload file name is returned.
Path where the file has been temporarily preserved is returned.
The size of the upload file is returned.
The contents type of the upload file is returned.
The HASH reference of various information concerning the up-loading file returns.
$upload->filename seems to return in shape that local PATH of the client is included in case of mod_perl. Then, after only the file name is extracted, this method is returned.
The file is temporarily copied to the specified place.
The hard link of files is temporarily made for the specified place.
Egg::Request::Apache, Egg::Request::CGI, Egg::Release,
Masatoshi Mizuno <lushe@cpan.org>
Copyright (C) 2007 by Masatoshi Mizuno <mizuno@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.