Html 在Mule中使用Http端点接收多个文件
我有下面的html,它将多个文件上传到URLhttp://localhost:5000/intake: 但在Mule,我总是只收到一个文件 这是我的mule配置:Html 在Mule中使用Http端点接收多个文件,html,mule,Html,Mule,我有下面的html,它将多个文件上传到URLhttp://localhost:5000/intake: 但在Mule,我总是只收到一个文件 这是我的mule配置: <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="5000" doc:name="HTTP Listener Configuration"/> <file:connector name="File" autoDe
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="5000" doc:name="HTTP Listener Configuration"/>
<file:connector name="File" autoDelete="true" streaming="true" validateConnections="true" doc:name="File"/>
<flow name="simpletestFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/intake" doc:name="HTTP" allowedMethods="POST" responseStreamingMode="NEVER"/>
<foreach collection="#[message.inboundAttachments]" doc:name="For Each">
<file:outbound-endpoint path="C:/Users/U595036/AnypointStudio/Production/upload/src/main/wsdl" outputPattern="#[key]" connector-ref="File" responseTimeout="10000" doc:name="File"/>
</foreach>
</flow>
[message.inboundAttachments]中始终只有一个文件,即使浏览器发送多个文件。Mule一次只能处理一个文件每个记录一个线程,在您的情况下,您可以将文件上载到文件夹,并通过ftp处理流。您应该通过TCP监视器运行POST消息,查看原始消息,以查看是否有多个部分。这将帮助您确定问题发生的位置。
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="5000" doc:name="HTTP Listener Configuration"/>
<file:connector name="File" autoDelete="true" streaming="true" validateConnections="true" doc:name="File"/>
<flow name="simpletestFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/intake" doc:name="HTTP" allowedMethods="POST" responseStreamingMode="NEVER"/>
<foreach collection="#[message.inboundAttachments]" doc:name="For Each">
<file:outbound-endpoint path="C:/Users/U595036/AnypointStudio/Production/upload/src/main/wsdl" outputPattern="#[key]" connector-ref="File" responseTimeout="10000" doc:name="File"/>
</foreach>
</flow>