/** * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a> * compliant <code>multipart/form-data</code> stream. * * @param request The portlet request to be parsed. * * @return A list of <code>FileItem</code> instances parsed from the * request, in the order that they were transmitted. * * @throws FileUploadException if there are problems reading/parsing * the request or storing files. */ public List<FileItem> parseRequest(ActionRequest request) throws FileUploadException { return parseRequest(new PortletRequestContext(request)); }
/** * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a> * compliant <code>multipart/form-data</code> stream. * * @param request The portlet request to be parsed. * * @return A list of <code>FileItem</code> instances parsed from the * request, in the order that they were transmitted. * * @throws FileUploadException if there are problems reading/parsing * the request or storing files. */ public List /* FileItem */ parseRequest(ActionRequest request) throws FileUploadException { return parseRequest(new PortletRequestContext(request)); }
/** * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a> * compliant <code>multipart/form-data</code> stream. * * @param request The portlet request to be parsed. * * @return A list of <code>FileItem</code> instances parsed from the * request, in the order that they were transmitted. * * @throws FileUploadException if there are problems reading/parsing * the request or storing files. */ public List<FileItem> parseRequest(ActionRequest request) throws FileUploadException { return parseRequest(new PortletRequestContext(request)); }
try requestParameters = fileUpload.parseRequest(request);
pfu.setSizeMax(maxSize); fac.setSizeThreshold((int) (maxSize + 1L)); List<FileItem> items = pfu.parseRequest((ActionRequest) req); for (FileItem f : items) { if (log.isDebugEnabled()) {
PortletFileUpload request = new PortletFileUpload(new DiskFileItemFactory()); try { List<FileItem> items = request.parseRequest(actionRequest); for (FileItem item : items) { if (item.isFormField()) {
enc = request.getCharacterEncoding(); final List requestParameters = fileUpload.parseRequest(request); for (final Iterator it = requestParameters.iterator(); it.hasNext();) { final FileItem fileItem = (FileItem) it.next();
requestParameters = fileUpload.parseRequest(request);
items = uploader.parseRequest(request); } catch (FileUploadException e) { addErrorMessage(request, getLocalizedString(request, "consolebase.bundlemanager.err.file.uploadError"));
List items = uploader.parseRequest(actionRequest); for (Iterator i = items.iterator(); i.hasNext();) { FileItem item = (FileItem) i.next();
/** * Parse the given portlet request, resolving its multipart elements. * @param request the request to parse * @return the parsing result * @throws MultipartException if multipart resolution failed. */ @SuppressWarnings("unchecked") protected MultipartParsingResult parseRequest(ActionRequest request) throws MultipartException { String encoding = determineEncoding(request); FileUpload fileUpload = prepareFileUpload(encoding); try { List<FileItem> fileItems = ((PortletFileUpload) fileUpload).parseRequest(request); return parseFileItems(fileItems, encoding); } catch (FileUploadBase.SizeLimitExceededException ex) { throw new MaxUploadSizeExceededException(fileUpload.getSizeMax(), ex); } catch (FileUploadException ex) { throw new MultipartException("Could not parse multipart portlet request", ex); } }
/** * Parse the given portlet request, resolving its multipart elements. * @param request the request to parse * @return the parsing result * @throws MultipartException if multipart resolution failed. */ protected MultipartParsingResult parseRequest(ActionRequest request) throws MultipartException { String encoding = determineEncoding(request); FileUpload fileUpload = prepareFileUpload(encoding); try { List<FileItem> fileItems = ((PortletFileUpload) fileUpload).parseRequest(request); return parseFileItems(fileItems, encoding); } catch (FileUploadBase.SizeLimitExceededException ex) { throw new MaxUploadSizeExceededException(fileUpload.getSizeMax(), ex); } catch (FileUploadBase.FileSizeLimitExceededException ex) { throw new MaxUploadSizeExceededException(fileUpload.getFileSizeMax(), ex); } catch (FileUploadException ex) { throw new MultipartException("Failed to parse multipart portlet request", ex); } }