Camel
  1. Camel
  2. CAMEL-1072

camel-ftp - option for upload suffix

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.0
    • Fix Version/s: 2.0-M1
    • Component/s: camel-ftp
    • Labels:
      None

      Description

      We should support an option to set a upload suffix for the FTP/SFTP producers, so Camel can upload fixes to a temporary name and after upload is complete it can rename it to the correct name,

      ServiceMix has such a feature.

        Activity

        Hide
        Claus Ibsen added a comment -

        Copy what you are doing in the FileProducer to do the same for the FTP/SFTP component

        Show
        Claus Ibsen added a comment - Copy what you are doing in the FileProducer to do the same for the FTP/SFTP component
        Hide
        Claus Ibsen added a comment -

        Now has same option as the file component: tempPrefix for both the FTP and SFTP producer

        D:\project\camel>svn commit --message "CAMEL-1072: Added tempPrefix option to FTP/SFTP producers, so you can upload using a temp filename and after upload rename it to the real name."
        Sending camel-core\src\main\java\org\apache\camel\component\file\FileProducer.java
        Sending components\camel-ftp\src\main\java\org\apache\camel\component\file\remote\FtpProducer.java
        Sending components\camel-ftp\src\main\java\org\apache\camel\component\file\remote\RemoteFileConfiguration.java
        Sending components\camel-ftp\src\main\java\org\apache\camel\component\file\remote\RemoteFileProducer.java
        Sending components\camel-ftp\src\main\java\org\apache\camel\component\file\remote\SftpProducer.java
        Adding components\camel-ftp\src\test\java\org\apache\camel\component\file\remote\FtpProducerTempPrefixTest.java
        Transmitting file data ......
        Committed revision 721662.

        Show
        Claus Ibsen added a comment - Now has same option as the file component: tempPrefix for both the FTP and SFTP producer D:\project\camel>svn commit --message " CAMEL-1072 : Added tempPrefix option to FTP/SFTP producers, so you can upload using a temp filename and after upload rename it to the real name." Sending camel-core\src\main\java\org\apache\camel\component\file\FileProducer.java Sending components\camel-ftp\src\main\java\org\apache\camel\component\file\remote\FtpProducer.java Sending components\camel-ftp\src\main\java\org\apache\camel\component\file\remote\RemoteFileConfiguration.java Sending components\camel-ftp\src\main\java\org\apache\camel\component\file\remote\RemoteFileProducer.java Sending components\camel-ftp\src\main\java\org\apache\camel\component\file\remote\SftpProducer.java Adding components\camel-ftp\src\test\java\org\apache\camel\component\file\remote\FtpProducerTempPrefixTest.java Transmitting file data ...... Committed revision 721662.
        Hide
        Claus Ibsen added a comment -

        Closing 2.0m1 tickets

        Show
        Claus Ibsen added a comment - Closing 2.0m1 tickets
        Hide
        Karl Palsson added a comment -

        This is great, but what about people who really do need a suffix? I've got an external system that needs me to write with a .tmp suffix, if I use a prefix, it still picks up my files.

        Will I just have to handle the renaming myself?

        Show
        Karl Palsson added a comment - This is great, but what about people who really do need a suffix? I've got an external system that needs me to write with a .tmp suffix, if I use a prefix, it still picks up my files. Will I just have to handle the renaming myself?
        Hide
        Claus Ibsen added a comment -

        The file/ftp components in Camel 2.0 is much smarter and flexible than 1.x.

        So we can improve the tempPrefix to be expression based so you can type a syntax as you like, for example
        tempFileName=${file:name}.tmp

        Which then will write using .tmp and then afterwards rename it back to the real name.

        Show
        Claus Ibsen added a comment - The file/ftp components in Camel 2.0 is much smarter and flexible than 1.x. So we can improve the tempPrefix to be expression based so you can type a syntax as you like, for example tempFileName=${ file:name }.tmp Which then will write using .tmp and then afterwards rename it back to the real name.
        Hide
        Claus Ibsen added a comment -

        CAMEL-2121 is the ticket to improve this

        Show
        Claus Ibsen added a comment - CAMEL-2121 is the ticket to improve this

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            Claus Ibsen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development