title: File Upload using ajax and jquery in spring
body: <pre><code>var urlUpload = "${root}manager/uploadFile.html";
  var params = $('#topicForm').serialize();
  
      $.ajax({
          type: 'POST',
          url: urlUpload,
          data: params,
          contentType: 'multipart/form-data',
                  processData: false,
          success: function(data) {
              alert("success");
          }
      });
  
  @RequestMapping(value="/manager/uploadFile.html", method = RequestMethod.POST)
  public String uploadFile(@ModelAttribute("topicForm") TopicForm topicForm,        
  @RequestParam("topicDoc") MultipartFile multipartFile ModelMap model) { ... }
  </code></pre>
  
  <p>I am getting the below exception</p>
  
  <blockquote>
    <p>org.springframework.web.multipart.MultipartException: Could not parse
    multipart servlet request; nested exception is
    org.apache.commons.fileupload.FileUploadException: the request was
    rejected because no multipart boundary was found.</p>
  </blockquote>
  
  <p>The plugin is working fine thank you.</p>
  
  <pre><code>var urlUpload = "${root}manager/uploadFile.html?categoryId="+$("#category").val()+"&amp;topicName="+$("#topicName").val();
   $.ajaxFileUpload({
   url:urlUpload, 
   secureuri:false,
   fileElementId:'fileupload',
   dataType: 'html',
   success: function (data, status) {
     alert("success");
   }
  });
  </code></pre>
  
  <p>The plugin is working fine, now i need to send few form fields to the controller along with the input file. in the above ajax call i appended the values to url. Is there any other solution for this?</p>