Reputation: 26498
I have the below flow
<file:endpoint
name="StartPoint"
path="C:\input"
pollingFrequency="5000"
doc:name="File"/>
<flow name="fileUploader" doc:name="fileUploader">
<quartz:inbound-endpoint
jobName="myServiceJob"
repeatInterval="5000"
doc:name="Quartz"
responseTimeout="10000">
<quartz:endpoint-polling-job>
<quartz:job-endpoint ref="StartPoint"/>
</quartz:endpoint-polling-job>
</quartz:inbound-endpoint>
<!--<object-to-byte-array-transformer doc:name="Object to Byte Array"/> -->
<file:outbound-endpoint
path="C:\outputfile"
responseTimeout="10000"
doc:name="File"/>
</flow>
Now suppose, I have some files say (1.txt,2.txt, myimg.jpg etc.) in the "C:\input".
While I run the flow, though the file transfer happens to the destination folder "C:\outputfile", but the file are getting converted to dat files.
So what is the problem and how to solve it?
Thanks in advance
Upvotes: 1
Views: 481
Reputation: 958
The problem is that Mule is naming the files after the message's id
property. To solve this use
<file:outbound-endpoint
path="C:\outputfile"
outputPattern="#[message.inboundProperties['originalFilename']]"
responseTimeout="10000"/>
Upvotes: 3