Web::Request::Upload - class representing a file upload
version 0.11
use Web::Request; my $app = sub { my ($env) = @_; my $req = Web::Request->new_from_env($env); my $upload = $req->uploads->{avatar}; };
This class represents a single uploaded file, generally from an <input type="file" /> element. You most likely don't want to create instances of this class yourself; they will be created for you via the uploads method on Web::Request.
<input type="file" />
uploads
Returns an HTTP::Headers object containing the headers specific to this upload.
Returns the MIME type of the uploaded file. Corresponds to the Content-Type header.
Content-Type
Returns the local on-disk filename where the uploaded file was saved.
Returns the size of the uploaded file.
Returns the preferred filename of the uploaded file.
Returns the filename portion of filename, with all directory components stripped.
filename
Jesse Luehrs <doy@tozt.net>
This software is copyright (c) 2013 by Jesse Luehrs.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Web::Request, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Web::Request
CPAN shell
perl -MCPAN -e shell install Web::Request
For more information on module installation, please visit the detailed CPAN module installation guide.