Hi Camel allows to send the message body as-is over FTP (either if its text based or binary), the latter assum it can be read as input stream.
Camel uses type converters for this. http://camel.apache.org/type-converter.html So if you want Camel to send a file to a ftp server you can just keep the data as a String, and it will upload the data as text. You can use the Exchange.FILE_NAME header if you want to give the file a fixed name. See more details at http://camel.apache.org/file2 http://camel.apache.org/ftp2 http://camel.apache.org/ftp-example.html On Wed, Jun 25, 2014 at 10:42 PM, eswar <easwaramoor...@gmail.com> wrote: > hi - > > I have a message with body content with string value of file name and > directory in it. That I need to send to a different server using sftp > component. I am sure we need to convert the message body to a File class to > be able to send it using the sftp, do we need to scan through the file to > convert this or is there an alternative to this ?please suggest. > > > thanks > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/convertBody-To-SFTP-component-tp5752815.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@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/