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.
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.
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.
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.