Examples of DiskFileItemFactory


Examples of org.apache.tomcat.util.http.fileupload.DiskFileItemFactory

            contentType = contentType.trim();
        }
        if (!("multipart/form-data".equals(contentType)))
            throw new ServletException(sm.getString("coyoteRequest.notMultipart"));

        DiskFileItemFactory factory = new DiskFileItemFactory();
        if (config.getLocation() != null) {
            factory.setRepository(new File(config.getLocation()));
        }
        if (config.getFileSizeThreshold() > 0) {
            factory.setSizeThreshold(config.getFileSizeThreshold());
        }
       
        ServletFileUpload upload = new ServletFileUpload();
        upload.setFileItemFactory(factory);
        upload.setFileSizeMax(config.getMaxFileSize());
View Full Code Here

Examples of org.apache.tomcat.util.http.fileupload.disk.DiskFileItemFactory

                            location));
            return;
        }
       
        // Create a new file upload handler
        DiskFileItemFactory factory = new DiskFileItemFactory();
        try {
            factory.setRepository(location.getCanonicalFile());
        } catch (IOException ioe) {
            partsParseException = ioe;
            return;
        }
        factory.setSizeThreshold(mce.getFileSizeThreshold());
       
        ServletFileUpload upload = new ServletFileUpload();
        upload.setFileItemFactory(factory);
        upload.setFileSizeMax(mce.getMaxFileSize());
        upload.setSizeMax(mce.getMaxRequestSize());
View Full Code Here

Examples of org.apache.wicket.util.upload.DiskFileItemFactory

   *             Thrown if something goes wrong with upload
   */
  public MultipartServletWebRequestImpl(HttpServletRequest request, String filterPrefix,
    Bytes maxSize) throws FileUploadException
  {
    this(request, filterPrefix, maxSize, new DiskFileItemFactory(Application.get()
      .getResourceSettings()
      .getFileUploadCleaner()));
  }
View Full Code Here

Examples of org.apache.wicket.util.upload.DiskFileItemFactory

   */
  public void testGetInputStream() throws Exception
  {
    IFileUploadCleaner fileUploadCleaner = new FileUploadCleaner();

    FileItem fileItem = new DiskFileItemFactory(fileUploadCleaner).createItem("dummyFieldName",
      "text/java", false, "FileUploadTest.java");
    // Initialize the upload
    fileItem.getOutputStream();

    // Get the internal list out
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.