other versions
- Tumbleweed 1.0057-1.1
- Leap-16.0
- Leap-15.6
| Plack::Request::Upload(3) | User Contributed Perl Documentation | Plack::Request::Upload(3) |
NAME¶
Plack::Request::Upload - handles file upload requests
SYNOPSIS¶
# $req is Plack::Request
my $upload = $req->uploads->{field};
$upload->size;
$upload->path;
$upload->content_type;
$upload->basename;
METHODS¶
- size
- Returns the size of Uploaded file.
- path
- Returns the path to the temporary file where uploaded file is saved.
- content_type
- Returns the content type of the uploaded file.
- filename
- Returns the original filename in the client.
- basename
- Returns basename for "filename". Characters other than word
characters, "." and
"-" are replaced with
"_", and a name that would be empty,
"." or
".." is returned as
"_".
Note that the returned value is still client-supplied: you should make sure it doesn't overwrite existing files before using it as a file name.
AUTHORS¶
Kazuhiro Osawa
Tatsuhiko Miyagawa
SEE ALSO¶
Plack::Request, Catalyst::Request::Upload
| 2026-10-26 | perl v5.44.0 |