I a batch job that picks the file (larger than 200 MB) from FTP folder and we are doing a multipart/form data upload to an external service. The issue we are running into is out of memory and mule logs suggest enable streaming for FTP connector. If I enable streaming on the FTP connector then I am getting a ‘no object DCH for mime type application/xml’ error. How do I set the content type for FTP file stream? Below is my config:
<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"/>
Thanks, ROA