Catalyst::Request::Upload - handles file upload requests
$upload->basename; $upload->copy_to; $upload->fh; $upload->filename; $upload->headers; $upload->link_to; $upload->size; $upload->slurp; $upload->tempname; $upload->type;
To specify where Catalyst should put the temporary files, set the 'uploadtmp' option in the Catalyst config. If unset, Catalyst will use the system temp dir.
__PACKAGE__->config( uploadtmp => '/path/to/tmpdir' );
It is provided a way to have configurable temporary directory. If there is no config uploadtmp, system temprary directory will used.
See also Catalyst.
This class provides accessors and methods to handle client upload requests.
Simple constructor.
Copies the temporary file using File::Copy. Returns true for success, false for failure.
$upload->copy_to('/path/to/target');
Opens a temporary file (see tempname below) and returns an IO::File handle.
Returns the client-supplied filename.
Returns an HTTP::Headers object for the request.
Creates a hard link to the temporary file. Returns true for success, false for failure.
$upload->link_to('/path/to/target');
Returns the size of the uploaded file in bytes.
Returns a scalar containing the contents of the temporary file.
Returns basename for filename.
filename
Returns the path to the temporary file.
Returns the client-supplied Content-Type.
Sebastian Riedel, sri@cpan.org
sri@cpan.org
Christian Hansen, ch@ngmedia.com
ch@ngmedia.com
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
To install Catalyst::Runtime, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Runtime
CPAN shell
perl -MCPAN -e shell install Catalyst::Runtime
For more information on module installation, please visit the detailed CPAN module installation guide.