1 package Catalyst::Request::Upload;
4 use base 'Class::Accessor::Fast';
8 __PACKAGE__->mk_accessors(qw/filename size tempname type/);
10 sub new { shift->SUPER::new( ref( $_[0] ) ? $_[0] : {@_} ) }
14 Catalyst::Request::Upload - Catalyst Request Upload Class
29 This is the Catalyst Request Upload class, which provides a set of accessors to the
38 Opens tempname and returns a C<IO::File> handle.
45 my $fh = IO::File->new( $self->tempname, O_RDONLY )
46 or die( "Can't open ", $self->tempname, ": ", $! );
51 =item $upload->filename
53 Contains client supplied filename.
57 Creates a new filename linked to the old filename. Returns true for
58 success, false otherwise.
60 $upload->link('/my/path');
68 return link( $self->tempname, $target );
73 Contains size of the file in bytes.
75 =item $upload->tempname
77 Contains path to the temporary spool file.
81 Contains client supplied Content-Type.
87 Sebastian Riedel, C<sri@cpan.org>
88 Christian Hansen, C<ch@ngmedia.com>
92 This program is free software, you can redistribute it and/or modify
93 it under the same terms as Perl itself.