[ 
https://issues.apache.org/jira/browse/CAMEL-17025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrea Cosentino updated CAMEL-17025:
-------------------------------------
    Fix Version/s: 3.21.0
                   4.0-M3
                       (was: 3.x)

> camel-aws-s3 - Allow moveAfterRead in same bucket for AWS S3 consumer
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-17025
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17025
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-aws, camel-aws2
>            Reporter: Fabio Zani
>            Assignee: Andrea Cosentino
>            Priority: Minor
>             Fix For: 3.21.0, 4.0-M3
>
>
> Using the AWS2 S3 component it would be nice to have a way to move a file 
> inside a different subfolder in the same bucket after reading it.
> h1. AS IS
> With the current implementation, the _moveAfterRead_ option requires to 
> specify the destination bucket and eventually a prefix and/or suffix.
> As it is not intended for moving into a different folder in the same bucket, 
> trying to specify the original bucket as destination and the path to the 
> subfolder as a prefix has an _ugly_ result, as shown in the following example.
> Original bucket: myBucket
>  File path: /path/to/foloder/run/test.txt
> _moveAfterRead=true_
> _destinationBucket=myBucket_
>  _destinationBucketPrefix=/path/to/folder/done_
> Result:  file is moved, but file key is 
> _/path/to/folder/done/path/to/folder/test.txt_
> h1. TO BE
> Allow moving the file under a different folder in the same bucket.
> An option would be to recognize if the destination bucket is the same as the 
> original bucket, requiring the destinationBuketPrefix to be set, moving the 
> file (with the filename extracted from the _CamelAwsS3Key_) under the 
> specified prefix.
> Another option would be to introduce a new option designed specifically to 
> move the file within the same bucket. The moveAfterRead option would then 
> require either the _destinationBucket_ option or the 
> _destinationSubfolderPrefix_ to be set.
> In case the second solution is chosen, the _destinationBucketSuffix_ option 
> could be renamed in _destinationSuffix_ to be used with both moving within 
> the bucket or to another bucket or a new option 
> (_destinationSubfolderSuffix_) should be introduced.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to