jquery - Upload from mobile an image in java with ajax -


first of all, don't use jquerymobile.
want upload image on tomcat7 server.
in desktop-app works fine, when im going mobile, cause error:

no signature of method: org.springframework.security.web.servletapi.httpservlet3requestfactory$servlet3securitycontextholderawarerequestwrapper.getfile() applicable argument types: (java.lang.string) values: [file]

this java-code:

// file upload def uploadfileinput = 'file' multipartfile sourcefile = request.getfile(uploadfileinput) 

this ajax:

$.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 errors' )    } } ); 

this html:

<form enctype="multipart/form-data">     <input type="file" name="file" accept="jpg,png,gif" style="display: none"> </form> 

did forget something?


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -