---
name: "Jifty::Web::FileUpload"
section: "3pm"
platform: "linux"
package: "libjifty-perl"
version: "1.10518+dfsg-2"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/Jifty::Web::FileUpload"
---

# Jifty::Web::FileUpload(3pm)

Describes an HTTP file upload

## NAME

Jifty::Web::FileUpload - Describes an HTTP file upload

## DESCRIPTION

Currently this module is very much geared towards the use case of the current request offering a file upload, and inspecting CGI to produce metadata.

Refactorings to eliminate these assumptions are very welcome.

### new PARAMHASH

Creates a new file upload object.  The possible arguments in the `"PARAMHASH"` are:

- filehandle

  The filehandle to read the content from. If this is not an Fh object produced by CGI, then `"content_type"` is mandatory and you probably want to set `"filename"` yourself.

- content (optional)

  The upload's content. Will be intuited if possible.

- filename (optional)

  The upload's filename as given by the client (i.e. X on disk). Will be intuited if possible.

- content\_type (optional)

  The content type as reported by the client.

### content

Lazily slurps in the filehandle's content.

### new\_from\_fh Fh

Convenience method, since the other bits can be gleaned from the Fh object.

### new\_from\_plack $u
