Package http.utils.multipartrequest

Examples of http.utils.multipartrequest.ServletMultipartRequest


      log.debug("module name missed");
      return;
    }
    boolean userProfile = moduleName.equals("userprofile");

    ServletMultipartRequest upload = new ServletMultipartRequest(
        httpServletRequest, 104857600, "utf-8"); // max 100 mb
    InputStream is = upload.getFileContents("Filedata");

    // trim whitespace
    String fileSystemName = upload.getFileSystemName("Filedata");
    fileSystemName = StringUtils.deleteWhitespace(fileSystemName);

    // Flash cannot read the response of an upload
    // httpServletResponse.getWriter().print(returnError);
    uploadFile(userProfile, userId, roomName, is, fileSystemName, hs);
View Full Code Here


          File working_dirFile = new File(working_dir);
          if (!working_dirFile.exists()) {
            working_dirFile.mkdir();
          }
         
          ServletMultipartRequest upload = new ServletMultipartRequest(
              httpServletRequest, 104857600*10, "utf-8"); // max 1000 mb
          InputStream is = upload.getFileContents("Filedata");
         
          @SuppressWarnings("deprecation")
          String fileSystemName = upload.getFileSystemName("Filedata");
         
          StringUtils.deleteWhitespace(fileSystemName);
         
          int dotidx=fileSystemName.lastIndexOf('.');
          String newFileSystemName = StringComparer.getInstance()
View Full Code Here

        }
        Long parentFolderId = Long.parseLong(parentFolderIdAsString);

        String current_dir = getServletContext().getRealPath("/");

        ServletMultipartRequest upload = new ServletMultipartRequest(
                httpServletRequest, 104857600 * 5, // max 500 mb
                "utf-8");
        InputStream is = upload.getFileContents("Filedata");
        String fileSystemName = upload.getBaseFilename("Filedata");
        log.debug("fileSystemName: " + fileSystemName);

        ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
       
        FileProcessor fileProcessor = (FileProcessor) context.getBean("openmeetings.FileProcessor");
View Full Code Here

            organisation = "0";
          }
          Long organisation_id = Long.valueOf(organisation).longValue();
          log.debug("organisation_id: " + organisation_id);

          ServletMultipartRequest upload = new ServletMultipartRequest(httpServletRequest, 104857600); // max100 mb
          InputStream is = upload.getFileContents("Filedata");
         
          UserImport.getInstance().addUsersByDocument(is);

        } else if (moduleName.equals("language")) {
          log.error("Import Language");
          String language = httpServletRequest.getParameter("secondid");
          if (language == null) {
            language = "0";
          }
          Long language_id = Long.valueOf(language).longValue();
          System.out.println("language_id: " + language_id);

          ServletMultipartRequest upload = new ServletMultipartRequest(httpServletRequest, 104857600); // max100 mb
          InputStream is = upload.getFileContents("Filedata");
         
          LanguageImport.getInstance().addLanguageByDocument(language_id, is);
         
        }
      } else {
View Full Code Here

          record = "no";
        }
       
        log.debug("record: " + record);
       
        ServletMultipartRequest upload = new ServletMultipartRequest(httpServletRequest, 104857600); // max 100 mb
       
       
        Long users_id = Sessionmanagement.getInstance().checkSession(sid);
        Long user_level = Usermanagement.getInstance().getUserLevelByID(users_id);
     
View Full Code Here

        //this needs to be synchronised, as we should not change the encoding at the same time as
        //calling the constructor.  See javadoc for MultipartRequest.setEncoding().
        synchronized (this) {
            setEncoding();
            if (maxSizeProvided){
              multi = new ServletMultipartRequest(servletRequest, saveDir, maxSize);
            }else{
              multi = new ServletMultipartRequest(servletRequest, saveDir);
            }
        }
    }
View Full Code Here

    public void parse(HttpServletRequest servletRequest, String saveDir) throws IOException {
        //this needs to be synchronised, as we should not change the encoding at the same time as
        //calling the constructor.  See javadoc for MultipartRequest.setEncoding().
        synchronized (this) {
            setEncoding();
            multi = new ServletMultipartRequest(servletRequest, saveDir);
        }
    }
View Full Code Here

        //this needs to be synchronised, as we should not change the encoding at the same time as
        //calling the constructor.  See javadoc for MultipartRequest.setEncoding().
        synchronized (this) {
            setEncoding();
            if (maxSizeProvided){
              multi = new ServletMultipartRequest(servletRequest, saveDir, maxSize);
            }else{
              multi = new ServletMultipartRequest(servletRequest, saveDir);
            }
        }
    }
View Full Code Here

        //this needs to be synchronised, as we should not change the encoding at the same time as
        //calling the constructor.  See javadoc for MultipartRequest.setEncoding().
        synchronized (this) {
            setEncoding();
            if (maxSizeProvided){
              multi = new ServletMultipartRequest(servletRequest, saveDir, maxSize);
            }else{
              multi = new ServletMultipartRequest(servletRequest, saveDir);
            }
        }
    }
View Full Code Here

        //this needs to be synchronised, as we should not change the encoding at the same time as
        //calling the constructor.  See javadoc for MultipartRequest.setEncoding().
        synchronized (this) {
            setEncoding();
            if (maxSizeProvided){
              multi = new ServletMultipartRequest(servletRequest, saveDir, maxSize);
            }else{
              multi = new ServletMultipartRequest(servletRequest, saveDir);
            }
        }
    }
View Full Code Here

TOP

Related Classes of http.utils.multipartrequest.ServletMultipartRequest

Copyright © 2018 www.massapicom. 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.