This is an automated email from the ASF dual-hosted git repository. fmariani pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 928e6d2c99dcec3ec27ccf86a17aa2c54193284e Author: Croway <[email protected]> AuthorDate: Wed Feb 5 15:28:35 2025 +0100 (chore) ATTACHMENTS_SIZE header --- .../camel-platform-http/src/main/docs/platform-http-component.adoc | 4 ++-- core/camel-api/src/main/java/org/apache/camel/Exchange.java | 3 ++- .../camel-api/src/main/java/org/apache/camel/ExchangePropertyKey.java | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/components/camel-platform-http/src/main/docs/platform-http-component.adoc b/components/camel-platform-http/src/main/docs/platform-http-component.adoc index 96c236cfea9..e9c9acf3109 100644 --- a/components/camel-platform-http/src/main/docs/platform-http-component.adoc +++ b/components/camel-platform-http/src/main/docs/platform-http-component.adoc @@ -91,8 +91,8 @@ Since Apache Camel 4.10, multipart file uploads are easier and harmonized across * The Apache Camel message contains: ** The uploaded file in the message body ** The file name in the "CamelFileName" message header -** The file's content type in the "CamelFileContentType" message header -** The file's size in the "CamelFileLength" message header +** The file content type in the "CamelFileContentType" message header +** The file size in the "CamelFileLength" message header In case of multiple uploads, the header "CamelAttachmentsSize" contains the number of files uploaded. diff --git a/core/camel-api/src/main/java/org/apache/camel/Exchange.java b/core/camel-api/src/main/java/org/apache/camel/Exchange.java index 6f07c90cfd8..c0c0b285f32 100644 --- a/core/camel-api/src/main/java/org/apache/camel/Exchange.java +++ b/core/camel-api/src/main/java/org/apache/camel/Exchange.java @@ -96,6 +96,8 @@ public interface Exchange extends VariableAware { javaType = "boolean") String AGGREGATION_COMPLETE_ALL_GROUPS_INCLUSIVE = "CamelAggregationCompleteAllGroupsInclusive"; String ASYNC_WAIT = "CamelAsyncWait"; + @Metadata(description = "The number of Multipart files uploaded with a single request") + String ATTACHMENTS_SIZE = "CamelAttachmentsSize"; String BATCH_INDEX = "CamelBatchIndex"; String BATCH_SIZE = "CamelBatchSize"; @@ -117,7 +119,6 @@ public interface Exchange extends VariableAware { String CONTENT_TYPE = "Content-Type"; String COOKIE_HANDLER = "CamelCookieHandler"; String CORRELATION_ID = "CamelCorrelationId"; - String ATTACHMENTS_SIZE = "CamelAttachmentsSize"; // The schema of the message payload String CONTENT_SCHEMA = "CamelContentSchema"; diff --git a/core/camel-api/src/main/java/org/apache/camel/ExchangePropertyKey.java b/core/camel-api/src/main/java/org/apache/camel/ExchangePropertyKey.java index 167eb3d8bb5..b4232869aa1 100644 --- a/core/camel-api/src/main/java/org/apache/camel/ExchangePropertyKey.java +++ b/core/camel-api/src/main/java/org/apache/camel/ExchangePropertyKey.java @@ -30,6 +30,7 @@ public enum ExchangePropertyKey { AGGREGATION_COMPLETE_ALL_GROUPS(Exchange.AGGREGATION_COMPLETE_ALL_GROUPS), AGGREGATION_COMPLETE_CURRENT_GROUP(Exchange.AGGREGATION_COMPLETE_CURRENT_GROUP), AGGREGATION_STRATEGY(Exchange.AGGREGATION_STRATEGY), + ATTACHMENTS_SIZE(Exchange.ATTACHMENTS_SIZE), BATCH_COMPLETE(Exchange.BATCH_COMPLETE), BATCH_INDEX(Exchange.BATCH_INDEX), BATCH_SIZE(Exchange.BATCH_SIZE), @@ -105,6 +106,8 @@ public enum ExchangePropertyKey { return AGGREGATION_COMPLETE_CURRENT_GROUP; case Exchange.AGGREGATION_STRATEGY: return AGGREGATION_STRATEGY; + case Exchange.ATTACHMENTS_SIZE: + return ATTACHMENTS_SIZE; case Exchange.BATCH_COMPLETE: return BATCH_COMPLETE; case Exchange.BATCH_INDEX:
