You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Luigi De Masi (Jira)" <ji...@apache.org> on 2020/11/05 17:16:00 UTC
[jira] [Updated] (CAMEL-15822) [camel-file] fileExist=Move doesn't
use FileMoveExistingStrategy when tempFile is also configured
[ https://issues.apache.org/jira/browse/CAMEL-15822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luigi De Masi updated CAMEL-15822:
----------------------------------
Description:
When both fileExist=Move and tempFile are set, GenericFileProducer.doMoveExistingFile is called, while when tempFile is not set FileMoveExistingStrategy.FileMoveExistingStrategy.
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:
{code:java}
file://data/file?tempFileName=${file:onlyname}.temp&fileExist=Move&moveExisting=${file:parent}/archive-${date:now:yyyyMMddHHmmssSSS}/${file:onlyname}"
{code}
it would be nice to have support for partial dynamic subdir name like this :
{code}
fileExist=Move&moveExisting=archive-${date:now:yyyyMMddHHmmssSSS}
{code}
was:
When both fileExist=Move and tempFile are set, GenericFileProducer.doMoveExistingFile is called, while when tempFile is not set FileMoveExistingStrategy.FileMoveExistingStrategy.
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:
{code:java}
file://data/file?tempFileName=${file:onlyname}.temp&fileExist=Move&moveExisting=${file:parent}/archive-${date:now:yyyyMMddHHmmssSSS}/${file:onlyname}"
{code}
it would be nice to have support for partial dynamic subdir name like this :
{code}
fileExist=Move&moveExisting=archive-${date:now:yyyyMMddHHmmssSSS}/
{code}
> [camel-file] fileExist=Move doesn't use FileMoveExistingStrategy when tempFile is also configured
> ---------------------------------------------------------------------------------------------------
>
> Key: CAMEL-15822
> URL: https://issues.apache.org/jira/browse/CAMEL-15822
> Project: Camel
> Issue Type: Bug
> Components: camel-core, camel-ftp, camel-sftp
> Affects Versions: 3.6.0
> Reporter: Luigi De Masi
> Assignee: Luigi De Masi
> Priority: Major
>
> When both fileExist=Move and tempFile are set, GenericFileProducer.doMoveExistingFile is called, while when tempFile is not set FileMoveExistingStrategy.FileMoveExistingStrategy.
> 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:
> {code:java}
> file://data/file?tempFileName=${file:onlyname}.temp&fileExist=Move&moveExisting=${file:parent}/archive-${date:now:yyyyMMddHHmmssSSS}/${file:onlyname}"
> {code}
>
> it would be nice to have support for partial dynamic subdir name like this :
> {code}
> fileExist=Move&moveExisting=archive-${date:now:yyyyMMddHHmmssSSS}
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)