Apache Camel 多部分 HTTP 帖子(文件上传)

2022-01-19 00:00:00 java apache-camel

如何使用 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")

相关文章