1Catalyst::Request::UploUasde(r3)Contributed Perl DocumenCtaattailoynst::Request::Upload(3)
2
3
4

NAME

6       Catalyst::Request::Upload - handles file upload requests
7

SYNOPSIS

9           $upload->basename;
10           $upload->copy_to;
11           $upload->fh;
12           $upload->filename;
13           $upload->headers;
14           $upload->link_to;
15           $upload->size;
16           $upload->slurp;
17           $upload->tempname;
18           $upload->type;
19
20       To specify where Catalyst should put the temporary files, set the
21       'uploadtmp' option in the Catalyst config. If unset, Catalyst will use
22       the system temp dir.
23
24           __PACKAGE__->config( uploadtmp => '/path/to/tmpdir' );
25
26       It is provided a way to have configurable temporary directory.  If
27       there is no config uploadtmp, system temprary directory will used.
28
29           __PACKAGE__->config( uploadtmp => '/path/to/tmpdir' );
30
31       See also Catalyst.
32

DESCRIPTION

34       This class provides accessors and methods to handle client upload
35       requests.
36

METHODS

38       $upload->new
39
40       Simple constructor.
41
42       $upload->copy_to
43
44       Copies the temporary file using File::Copy. Returns true for success,
45       false for failure.
46
47            $upload->copy_to('/path/to/target');
48
49       $upload->fh
50
51       Opens a temporary file (see tempname below) and returns an IO::File
52       handle.
53
54       $upload->filename
55
56       Returns the client-supplied filename.
57
58       $upload->headers
59
60       Returns an HTTP::Headers object for the request.
61
62       $upload->link_to
63
64       Creates a hard link to the temporary file. Returns true for success,
65       false for failure.
66
67           $upload->link_to('/path/to/target');
68
69       $upload->size
70
71       Returns the size of the uploaded file in bytes.
72
73       $upload->slurp
74
75       Returns a scalar containing the contents of the temporary file.
76
77       $upload->basename
78
79       Returns basename for "filename".
80
81       $upload->tempname
82
83       Returns the path to the temporary file.
84
85       $upload->type
86
87       Returns the client-supplied Content-Type.
88

AUTHORS

90       Sebastian Riedel, "sri@cpan.org"
91
92       Christian Hansen, "ch@ngmedia.com"
93
95       This program is free software, you can redistribute it and/or modify it
96       under the same terms as Perl itself.
97
98
99
100perl v5.8.8                       2007-09-20      Catalyst::Request::Upload(3)
Impressum