I want to download a zip file using apache camel route. For this purpose, I have used following code.
<from uri="timer:testTimer?repeatCount=1"/>
<to uri="http://example.com/data.zip"/>
<to uri="file:data.zip"/>
This code is successfully downloading the source file. However, I find following limitations
data.zip
is created, and file is saved inside that directory.So, basically my questions are:
fileName
attribute to set file name. Will it work in this case?Yes use file:directoryName?fileName=data.zip
to tell Camel to store the file in that directory using that file name.
Read more in the documents: http://camel.apache.org/file2