【发布时间】:2017-01-25 18:33:46
【问题描述】:
我是一个从 FTP 文件夹中挑选文件(大于 200 MB)的批处理作业,我们正在将多部分/表单数据上传到外部服务。我们遇到的问题是内存不足,并且 mule 日志建议为 FTP 连接器启用流式传输。如果我在 FTP 连接器上启用流式传输,则会收到“无对象 DCH for mime type application/xml”错误。如何设置 FTP 文件流的内容类型? 以下是我的配置:
<ftp:inbound-endpoint host="${ftp.host}" port="${ftp.port}" path="${ftp.path}" user="${ftp.user}" password="${ftp.password}" connector-ref="FTP" responseTimeout="10000" doc:name="FTP"/>
<set-attachment attachmentName="#[message.inboundProperties.originalFilename]" value="#[message.payload]" contentType="application/xml" doc:name="Set File"/>
<set-payload value="#[null]" doc:name="Set Payload"/>
<http:request config-ref="HTTP_Request_Configuration" path="${api.importPath}//${api.files}" method="POST" doc:name="HTTP-Invoke Upload ">
<http:request-builder>
<http:header headerName="${access.token}" value="${access.token.value}"/>
<http:header headerName="${client.secret}" value="${client.secret.value}"/>
<http:header headerName="${authorization.mode}" value="${authorization.mode.value}"/>
</http:request-builder>
</http:request>
<ftp:connector name="FTP" pollingFrequency="1000" validateConnections="true" doc:name="FTP" streaming="true"/>
谢谢, 资产收益率
【问题讨论】: