Hello guys,
thanks for help. I finally made it working:
REST part:
@POST
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Path("/upload")
@Produces(MediaType.APPLICATION_JSON)
public Response uploadFile(
@Multipart(value = "document") @NotNull Attachment attachment,
@Multipart("product") String product,
@Multipart("uploader") String uploader,
@Multipart("folderId") String folderId) {
return null;
}
This the way I can access all neccessary information:
Attachment att = exchange.getIn().getBody(Attachment.class);
System.out.println("Disposition = " + att.getContentDisposition());
System.out.println("Headers" + att.getHeaders());
System.out.println("File name" + att.getDataHandler().getName());
Hope it will help somebody :-)
-----
-Br, Roman
--
View this message in context:
http://cxf.547215.n5.nabble.com/Multipart-file-upload-tp5730547p5730583.html
Sent from the cxf-user mailing list archive at Nabble.com.