You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2024/09/04 06:52:13 UTC
(camel) branch camel-4.4.x updated: CAMEL-21161: camel-aws2-s3 is uploading always files as multipart when multiPartUpload is set true. Thanks to Guillem Folch for the patch. (#15416)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-4.4.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.4.x by this push:
new 8c2a10e222f CAMEL-21161: camel-aws2-s3 is uploading always files as multipart when multiPartUpload is set true. Thanks to Guillem Folch for the patch. (#15416)
8c2a10e222f is described below
commit 8c2a10e222f9f8cc66a4c5d9e5b16486773cd127
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Sep 4 08:49:42 2024 +0200
CAMEL-21161: camel-aws2-s3 is uploading always files as multipart when multiPartUpload is set true. Thanks to Guillem Folch for the patch. (#15416)
---
.../main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
index 899c4cc81cb..89f74ccaed7 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
+++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
@@ -149,7 +149,7 @@ public class AWS2S3Producer extends DefaultProducer {
}
long partSize = getConfiguration().getPartSize();
- if (contentLength == 0 && contentLength < partSize) {
+ if (contentLength == 0 || contentLength < partSize) {
// optimize to do a single op if content length is known and < part size
LOG.debug("File size < partSize. Uploading file in single operation: {}", filePayload);
processSingleOp(exchange);