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
Post a Comment