Skip to content

Commit 4fb68e3

Browse files
Abhra Dasguptafhussonnois
Abhra Dasgupta
authored andcommitted
fix: handle special character in S3 file name
1 parent 1ec82d1 commit 4fb68e3

File tree

1 file changed

+2
-1
lines changed
  • connect-file-pulse-filesystems/filepulse-amazons3-fs/src/main/java/io/streamthoughts/kafka/connect/filepulse/fs

1 file changed

+2
-1
lines changed

connect-file-pulse-filesystems/filepulse-amazons3-fs/src/main/java/io/streamthoughts/kafka/connect/filepulse/fs/S3BucketKey.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ public String objectName() {
8888
* @return the {@link URI} for this Amazon S3 object.
8989
*/
9090
public URI toURI() {
91-
return URI.create("s3://" + bucketName + S3_FOLDER_SEPARATOR + key);
91+
AmazonS3URI s3Uri = new AmazonS3URI("s3://" + bucketName + S3_FOLDER_SEPARATOR + key, true);
92+
return s3Uri.getURI();
9293
}
9394

9495
/**

0 commit comments

Comments
 (0)