final RequestContext context,
final ExternalContext externalContext,
final UploadedFiles files,
final MultipartFormItem item) throws IOException
{
final UploadedFile temp = new TempUploadedFile(item);
Map<String, Object> sessionMap = externalContext.getSessionMap();
Map<String, Object> requestMap = externalContext.getRequestMap();
_copyParamsFromSessionToRequestMap(sessionMap, requestMap,
UploadedFileProcessor.MAX_MEMORY_PARAM_NAME,
UploadedFileProcessor.MAX_DISK_SPACE_PARAM_NAME,
UploadedFileProcessor.TEMP_DIR_PARAM_NAME);
final UploadedFile file =
context.getUploadedFileProcessor().processFile(externalContext.getRequest(), temp);
if (file != null)
{
// Store the file.
files.__put(item.getName(), file);
if (_LOG.isFine())
{
_LOG.fine("Uploaded file " + file.getFilename() + "(" +
file.getLength() + " bytes) for ID " + item.getName());
}
}
}