if (uploads == null) {
uploads = new ArrayList<Upload>();
Request.current().args.put("__UPLOADS", uploads);
}
try {
uploads.add(new FileUpload(fileItem));
} catch (Exception e) {
// GAE does not support it, we try in memory
uploads.add(new MemoryUpload(fileItem));
}
putMapEntry(result, fileItem.getFieldName(), fileItem.getFieldName());