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

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -