## Overview

The Upload Service handles the parsing of multi-part/form-data from POST Requests, making the multi-part files available from either memory or from a specified location on the file system.

It is written for use in Turbine but it can be used in Avalon compatible container.

## Configuration

### Role Configuration

<role


### Component Configuration

Item Datatype Cardinality Description
repository String [0|1] The directory where files will be temporarily stored (default is "."). On Win32 file systems an entry of the form f:\path\to\upload\repository is most likely necessary.
sizeMax Integer [0|1] The maximum size of a request that will be processed (default is 1048576 bytes).
sizeThreshold Integer [0|1] The maximum size of a request that will have it's elements cached in memory (default is 10240 bytes).
headerEncoding String [0|1] Used to specify how the headers are encoded (default is "ISO-8859-1").

### Component Configuration Example

<upload repository="target" sizeMax="1048576" sizeThreshold="10240" headerEncoding="UTF-8"/>


## Usage

Create an HTML form of the type:

<form enctype="multipart/form-data" method="POST">
<input type="file" name="filename">

UploadService us = (UploadService) this.lookup(UploadService.ROLE);