Apache Camel multipart HTTP post(文件上传)

问题描述:

如何使用 Apache Camel HTTP 组件进行分段文件上传?

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

我不知道是否可以使用 HTTP 组件发送多部分表单.

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

如果您需要解决方法,您可以创建使用 Apache Http 客户端(及其MultipartPostMethod)的 POJO Spring Bean.然后你可以将你的消息路由到那个 bean:

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")