title: Upload from mobile an image in java with ajax
body: <p>First of all, I don't use jQueryMobile.<br>
  I want to upload an image on a tomcat7 server.<br>
  In desktop-app it works fine, but when im going mobile, it will cause an error:  </p>
  
  <blockquote>
    <p>No signature of method: org.springframework.security.web.servletapi.HttpServlet3RequestFactory$Servlet3SecurityContextHolderAwareRequestWrapper.getFile() is applicable for argument types: (java.lang.String) values: [file]</p>
  </blockquote>
  
  <p>This is my java-code:</p>
  
  <pre><code>// get the file to upload
  def uploadFileInput = 'file'
  MultipartFile sourceFile = request.getFile(uploadFileInput)
  </code></pre>
  
  <p>this is my ajax: </p>
  
  <pre><code>$.ajax( {
      url        : createLink( {controller: 'fileManager', action: 'upload', id: Location.params.id, params: {domain: Location.controller, profile: true}} ),
      data       : new FormData( form[0] ),
      cache      : false,
      contentType: false,
      processData: false,
      success    : function( data ) {
          [...]
      },
      error      : function() {
          console.log( 'Upload canceled with errors' )
     }
  } );
  </code></pre>
  
  <p>this is my html: </p>
  
  <pre><code>&lt;form enctype="multipart/form-data"&gt;
      &lt;input type="file" name="file" accept="jpg,png,gif" style="display: none"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Did I forget something?</p>