NAME
Mojo::Upload - Upload
SYNOPSIS
use Mojo::Upload;
my $upload = Mojo::Upload->new;
print $upload->filename;
$upload->copy_to('/foo/bar.txt');
DESCRIPTION
Mojo::Upload is a container for uploads.
ATTRIBUTES
Mojo::Upload implements the following attributes.
file
my $file = $upload->file;
$upload = $upload->file(Mojo::File->new);
filename
my $filename = $upload->filename;
$upload = $upload->filename('foo.txt');
length
my $length = $upload->length;
headers
my $headers = $upload->headers;
$upload = $upload->headers(Mojo::Headers->new);
name
my $name = $upload->name;
$upload = $upload->name('foo');
METHODS
Mojo::Upload inherits all methods from Mojo::Base and implements the following new ones.
copy_to
$upload->copy_to('/foo/bar/baz.txt');
move_to
$upload->move_to('/foo/bar/baz.txt');
slurp
my $content = $upload->slurp;