java - Upload to CXF restful web service -


I am trying to implement Apache Commons fileupload in my cxf cool web service. For some reason, ServletFileUpload.isMultipartContent (...) always returns false returns; I have checked the content type through: httpServletRequest.getContentType () and it returns the multipartual / form-data as expected. Anyone know what the reason is that the maliport content method returned incorrectly for? Below is my code: @POST @ path ("/ images") @ Consum (MediaType.MULTIPART_FORM_DATA) Public Response Upload Images (@contact javax.servlet.http.HttpServletRequest httpRequest) {list Item = null; Boolean is Multipart = servlet file upload.ImultiPart Content (httpRequest); If (isMultipart) {... ...} else {return Response.status (Status.BAD_REQUEST) .build (); }


Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -