Hi Use the CamelFileName (Exchange.FILE_NAME) header to set the name of the file you want to upload the file as on the FTP server. See more details at http://camel.apache.org/file2 http://camel.apache.org/file-language.html
Use the dynamic to pattern if you need to send to different FTP servers http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html On Fri, Nov 21, 2014 at 3:59 PM, havoc <[email protected]> wrote: > Hello, > > Yes, sorry my original post was not clear > > 1. I have a file that the previous route processor has written to the disk > 2. The file name is different every time > 3. Inside the process() method in the code above, I get the file name and > path on the local disk from the header information > 4. The ftp uri (the address where I want to send the file), also changes > depending on the file, so I also get it from the header, set by the previous > processor > 5. Now, I need to tell camel ftp to send this file to the given ftp uri, but > I am not sure how to set this file in the header / body for ftp to read it > > Also, using .recipientList(header("camel.trade.ftpuri")); was the only way I > found that I could give a dynamic uri to ftp... > > > > > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-FTP-sending-a-single-file-the-simplest-way-for-a-noob-tp5759452p5759462.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
