Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15822

[camel-file] fileExist=Move doesn't use FileMoveExistingStrategy when tempFile is also configured

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Unknown

    Description

      When both fileExist=Move and tempFile are set, GenericFileProducer.doMoveExistingFile is called, while when tempFile is not set FileMoveExistingStrategy.moveExistingFile.

       It seems a leftover from 2.X -> 3.x migration.

      As a result, endpoints like that won't work because GenericFileProducer.doMoveExistingFile doesn't support dynamic subdirectory auto-creation:

      file://data/file?tempFileName=${file:onlyname}.temp&fileExist=Move&moveExisting=${file:parent}/archive-${date:now:yyyyMMddHHmmssSSS}/${file:onlyname}"
      

       

      it would be nice to have support for partial dynamic subdir name like this :

       

      fileExist=Move&moveExisting=archive-${date:now:yyyyMMddHHmmssSSS}/
      

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ldemasi Luigi De Masi
            ldemasi Luigi De Masi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment