Hi Sergey.

Wow, thank you so much! The code is working like a charm since I used the
following snippet:

ContentDisposition cd = new ContentDisposition("form-data;
name=\"textfield\"");
ContentDisposition cd2 = new ContentDisposition("form-data; name=\"file\";
filename=\"image.png\"");
List<Attachment>  atts = new LinkedList<Attachment>();
atts.add(new Attachment("key", new
ByteArrayInputStream("my_textfield_value".getBytes()), cd)); 
atts.add(new Attachment("file", new FileInputStream(uploadFile), cd2));

Setting the content type manually for the text field was not even necessary.

Thanks alot, again!
Bye, Daniel

--
View this message in context: 
http://cxf.547215.n5.nabble.com/JAX-RS-client-Content-disposition-for-multiple-items-on-multipart-requests-tp5051629p5052125.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to