Examples of MultipartHttpServletRequest


Examples of org.springframework.web.multipart.MultipartHttpServletRequest

   */
  public Data uploadFiles(HttpServletRequest request, String path, long dirId) throws Exception {
    Data list = new Data();
    int index = 0;
   
    MultipartHttpServletRequest mptRequest = (MultipartHttpServletRequest) request;
    Iterator fileIter = mptRequest.getFileNames();
   
    while (fileIter.hasNext()) {
      MultipartFile mFile = mptRequest.getFile((String) fileIter.next());

      String tmp = mFile.getOriginalFilename();

      if (tmp.lastIndexOf("\\") >= 0) {
        tmp = tmp.substring(tmp.lastIndexOf("\\") + 1);
View Full Code Here

Examples of org.springframework.web.multipart.MultipartHttpServletRequest

    // are we expecting file upload?
    if (Uploadable.class.isAssignableFrom(command.getClass())
        && request instanceof MultipartHttpServletRequest) {
      List<FileInfo> files = null;
      Uploadable upload = (Uploadable) command;
      MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
      List<MultipartFile> multipartFiles = multipartRequest
          .getFiles(htmlId);

      // check if there is anything to process
      if (multipartFiles != null && !multipartFiles.isEmpty())
        // loop through all the attachments
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.