Multipart Rest based Java spring web service -


im new java based web service development. need create web service accepts multipart data(ex: zip file). please me out how mention in function.

below current web service code accepting data in form of json.

@requestmapping(value="/workitems/updatedata", method=requestmethod.post) @responsebody public object updatedata(@requestheader string devicetoken, @requestbody formfields[]       formfields,httpservletresponse response) throws exception {  //some code } 

please guide me how accept multipart data in web service method.

thanks in advance.

@requestmapping( value ="/workitems/updatedata",method=requestmethod.post ,headers="accept=application/xml, application/json")     public @responsebody     object updatedata(httpservletresponse response,@requestheader string devicetoken,             @requestparam ("file") multipartfile file) throws exception {    } 

you can support above.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -