Reputation: 1578
I used FTP component of camel but it could not download the files that I want.
<camel:endpoint id="ftpNotificationDownload" uri="sftp:/11.1.1.1://app/as?username=aa&password=1111&fastExistsCheck=true&localWorkDirectory=C:\\asd&download=true&throwExceptionOnConnectFailed=true&delay=4000&useFixedDelay=true"/>
I want all the files and folders to be downloaded under my local folder so I did not put filename option.
When I give the host name as 11.1.1.1
, it works but when I set directory after host name like 11.1.1.1:/app/directory
, it does not work.
I have checked SFTP server and it is up.
Upvotes: 0
Views: 2438
Reputation: 202088
There should not be a colon (:
) after the host name in the uri
. And probably not even one of the two slashes. On the other hand, you are missing one slash after the sftp:
.
See Apache Camels URIs syntax.
sftp://[username@]hostName[:port]/directoryName[?options]
Try
sftp://11.1.1.1/app/as?...
Note that this is true for any URI, not just Camel.
Upvotes: 1