Skip to content

Commit 928e6d2

Browse files
committed
(chore) ATTACHMENTS_SIZE header
1 parent 5d8f871 commit 928e6d2

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

components/camel-platform-http/src/main/docs/platform-http-component.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ Since Apache Camel 4.10, multipart file uploads are easier and harmonized across
9191
* The Apache Camel message contains:
9292
** The uploaded file in the message body
9393
** The file name in the "CamelFileName" message header
94-
** The file's content type in the "CamelFileContentType" message header
95-
** The file's size in the "CamelFileLength" message header
94+
** The file content type in the "CamelFileContentType" message header
95+
** The file size in the "CamelFileLength" message header
9696

9797
In case of multiple uploads, the header "CamelAttachmentsSize" contains the number of files uploaded.
9898

core/camel-api/src/main/java/org/apache/camel/Exchange.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ public interface Exchange extends VariableAware {
9696
javaType = "boolean")
9797
String AGGREGATION_COMPLETE_ALL_GROUPS_INCLUSIVE = "CamelAggregationCompleteAllGroupsInclusive";
9898
String ASYNC_WAIT = "CamelAsyncWait";
99+
@Metadata(description = "The number of Multipart files uploaded with a single request")
100+
String ATTACHMENTS_SIZE = "CamelAttachmentsSize";
99101

100102
String BATCH_INDEX = "CamelBatchIndex";
101103
String BATCH_SIZE = "CamelBatchSize";
@@ -117,7 +119,6 @@ public interface Exchange extends VariableAware {
117119
String CONTENT_TYPE = "Content-Type";
118120
String COOKIE_HANDLER = "CamelCookieHandler";
119121
String CORRELATION_ID = "CamelCorrelationId";
120-
String ATTACHMENTS_SIZE = "CamelAttachmentsSize";
121122

122123
// The schema of the message payload
123124
String CONTENT_SCHEMA = "CamelContentSchema";

core/camel-api/src/main/java/org/apache/camel/ExchangePropertyKey.java

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public enum ExchangePropertyKey {
3030
AGGREGATION_COMPLETE_ALL_GROUPS(Exchange.AGGREGATION_COMPLETE_ALL_GROUPS),
3131
AGGREGATION_COMPLETE_CURRENT_GROUP(Exchange.AGGREGATION_COMPLETE_CURRENT_GROUP),
3232
AGGREGATION_STRATEGY(Exchange.AGGREGATION_STRATEGY),
33+
ATTACHMENTS_SIZE(Exchange.ATTACHMENTS_SIZE),
3334
BATCH_COMPLETE(Exchange.BATCH_COMPLETE),
3435
BATCH_INDEX(Exchange.BATCH_INDEX),
3536
BATCH_SIZE(Exchange.BATCH_SIZE),
@@ -105,6 +106,8 @@ public static ExchangePropertyKey asExchangePropertyKey(String name) {
105106
return AGGREGATION_COMPLETE_CURRENT_GROUP;
106107
case Exchange.AGGREGATION_STRATEGY:
107108
return AGGREGATION_STRATEGY;
109+
case Exchange.ATTACHMENTS_SIZE:
110+
return ATTACHMENTS_SIZE;
108111
case Exchange.BATCH_COMPLETE:
109112
return BATCH_COMPLETE;
110113
case Exchange.BATCH_INDEX:

0 commit comments

Comments
 (0)