用户登录
用户注册

分享至

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

  • 作者: 老婆快来上我
  • 来源: 51数据库
  • 2022-11-15

问题描述

如何使用 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")
软件
前端设计
程序设计
Java相关