Froody::Upload - wrapper class for uploaded data in Froody


Froody documentation Contained in the Froody distribution.

Index


Code Index:

NAME

Top

Froody::Upload - wrapper class for uploaded data in Froody

SYNOPSIS

Top

  # used internally

DESCRIPTION

Top

This module represents uploads

Accessors

These are get/set accessors on the instance.

fh
filename
client_filename
mime_type

EASY CONSTRUCTOR

from_file( filename )

BUGS

Top

None known.

Please report any bugs you find via the CPAN RT system. http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Froody

AUTHOR

Top

Copyright Fotango 2005. All rights reserved.

Please see the main Froody documentation for details of who has worked on this project.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Top

Froody, Froody::Request::Apache, Froody::Request::CGI, Froody::XML


Froody documentation Contained in the Froody distribution.
package Froody::Upload;
use strict;
use warnings;

use base 'Froody::Base';

__PACKAGE__->mk_accessors(qw( fh filename client_filename mime_type ));

sub from_file {
  my $class = shift;
  my $filename = shift;
  open my $fh, $filename or die "Can't open $filename: $!";
  return $class->new->fh($fh)->filename($filename);
}

1;