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

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

    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

        Issue Links

          Activity

            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: