You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Gnana <m....@gmail.com> on 2015/02/04 10:10:37 UTC

Camel SFTP Zero size file download

 I am downloading PDF file from server using camel SFTP component. Sometime
it is downloading zero size file. but actual size is 4kb. I think camel is
downloading the file while it is being written. kindly let me know how to
download the file after file written operation is done. Give some example.

Route from URI =
sftp://username@hostname/path&binary=true&password=xxxx&download=true 



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SFTP-Zero-size-file-download-tp5762381.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel SFTP Zero size file download

Posted by Gnana <m....@gmail.com>.
Great, It looks it working fine 



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SFTP-Zero-size-file-download-tp5762381p5762385.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel SFTP Zero size file download

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You can try different read locks, such as changed which is supported by ftp.

Another alternative is if the "writer" writes the file using a
temporary name and then rename when its done, or write to some other
directory first, and then move the file in the end. Or write a 2nd
"done" file etc.

But try the changed read lock, it may be able to detect if the file is
currently being written. You can tweak the thresholds of the changed
read lock so you may need to find the right balance.

On Wed, Feb 4, 2015 at 10:10 AM, Gnana <m....@gmail.com> wrote:
>  I am downloading PDF file from server using camel SFTP component. Sometime
> it is downloading zero size file. but actual size is 4kb. I think camel is
> downloading the file while it is being written. kindly let me know how to
> download the file after file written operation is done. Give some example.
>
> Route from URI =
> sftp://username@hostname/path&binary=true&password=xxxx&download=true
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-SFTP-Zero-size-file-download-tp5762381.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/