3 Replies Latest reply on Sep 1, 2013 3:47 AM by srini8881

    SwitchYard - SFTP, FTP

    srini8881

      Hi,

       

      I have this requirement.  I need to read files from SFTP server and do some massaging.   I am using the SFTP binding for this reason.  But what I want to do is, premove the file to my local disk before starting to process.  When I am trying to give the premove option with the directory, the directory is being created on the SFTP server instead of the local directory. 

       

      Kindly advice on this.

       

      Thanks

      Srini.

        • 1. Re: SwitchYard - SFTP, FTP
          kcbabo

          Camel FTP bindings support a 'localWorkDirectory' parameter which allows a file to be spooled to local disk instead of read into memory.  Our FTP binding schema does not expose this parameter at present, but you can always use the camel URI binding to just pass a complete endpoint URI including this parameter.

           

          Camel FTP endpoint parameters:

          http://camel.apache.org/ftp2.html

           

          Camel URI binding in SY:

          Camel URI - SwitchYard - Project Documentation Editor

           

          If using this parameter satisfies your requirement, file a JIRA in SY and we'll add it to the config schema.

           

          Another option that provides more flexibility is to receive the file via a FTP binding into a camel route and then route it to the local disk via a file reference binding.  You could then have another service listening to the local file system via a File binding.

          • 2. Re: SwitchYard - SFTP, FTP
            synclpz

            Why not just write a bash script poller to move files to local HD then process them via file binding?

            • 3. Re: SwitchYard - SFTP, FTP
              srini8881

              Thanks Keith and Viktor.

               

              I had implemented Keith suggestion in this case anyways  

               

              Srini.