NAME

Para::Frame::Uploaded - Class for uploaded files

DESCRIPTION

Uploaded files are taken care of in Para::Frame::Client

They are temporarily saved in /tmp/paraframe/. The filename is the client process id followed by the fieldname with nonalfanum chars removed. The file is deleted directly after the request!

Use /save_as to store the file.

Example:

  $req->uploaded('filefield')->save_as($destfile);

new

  Para::Frame::Uploaded->new($fieldname)

Called by Para::Frame::Request/uploaded.

Returns: The Para::Frame::Uploaded object

save_as

  $uploaded->save_as( $destfile )

  $uploaded->save_as( $destfile, \%args )

Copies the file to $destfile.

SCP is supported. You can use //host/path or //user@host/path.

For SCP, $args->{username} is used if set.

Returns: $uploaded

fh

  $uploaded->fh

  $uploaded->fh( $mode )

Creates and returns an IO::File object

set_mode

info

  $uploaded->info

  $uploaded->info( $item )

Returns a hash from CGI uploadInfo(), ot the specified $item.

content_type

  $uploaded->content_type

Returns the best guess of the content type. It may be taken from /info or the file extension or the internal content of the file.

tempfile

  $uploaded->tempfile

Retuns a Para::Frame::File of the temporary file, that will be removed after this request.

tempfilename

  $uploaded->tempfilename

Retuns the filename of the temporary file, that will be removed after this request.

AUTHOR

  Jonas Liljegren E<lt>jonas@paranormal.seE<gt>

SEE ALSO

  L<Para::Frame>