Apache Camel multipart HTTP post (file upload)

Kai Sternad picture Kai Sternad · Mar 10, 2010 · Viewed 11.7k times · Source

How can I do multipart file uploads using the Apache Camel HTTP component ?

Answer

Henryk Konsek picture Henryk Konsek · Mar 17, 2010

I don't know is it possible to send multipart forms using the HTTP component.

If you need the workaround, you can create POJO Spring Bean that uses the Apache Http Client (and its MultipartPostMethod). Then you can route your message to that bean:

from("activemq:uploadQueue").to("bean:myApacheHttpClientBean?method=sendMultiPart")