Jesse Luehrs > Web-Request > Web::Request::Upload

Download:
Web-Request-0.11.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.11   Source  

NAME ^

Web::Request::Upload - class representing a file upload

VERSION ^

version 0.11

SYNOPSIS ^

  use Web::Request;

  my $app = sub {
      my ($env) = @_;
      my $req = Web::Request->new_from_env($env);
      my $upload = $req->uploads->{avatar};
  };

DESCRIPTION ^

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.

METHODS ^

headers

Returns an HTTP::Headers object containing the headers specific to this upload.

content_type

Returns the MIME type of the uploaded file. Corresponds to the Content-Type header.

tempname

Returns the local on-disk filename where the uploaded file was saved.

size

Returns the size of the uploaded file.

filename

Returns the preferred filename of the uploaded file.

basename

Returns the filename portion of filename, with all directory components stripped.

AUTHOR ^

Jesse Luehrs <doy@tozt.net>

COPYRIGHT AND LICENSE ^

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.

syntax highlighting: