Apache camel s3 component - specify suffix / regex for prefix

I am using the aws s3 component of Apache Camel. And I want to use specific data only with the extension .txt, how can this be achieved? According to the documentation for the camel, it has prefix options that are not suitable in my case, since I want to filter based on extensions.

TIA

+6
source share
1 answer

There is no way to do this.

You cannot use regex in the prefix option, as this is just a string, see http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/model/ListObjectsRequest.html# setPrefix (java.lang.String)

The only way is to get a list of files and filter them. Or specify the files so that you can use the prefix

+2
source

All Articles