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 2025/11/19 09:35:39 UTC
(camel) branch main updated: CAMEL-22686 Add handling of a WrappedFile body (#19892)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 8e671d7a4eec CAMEL-22686 Add handling of a WrappedFile body (#19892)
8e671d7a4eec is described below
commit 8e671d7a4eec89437217433c2322ce3d23d64446
Author: Tom Cunningham <tc...@redhat.com>
AuthorDate: Wed Nov 19 04:35:34 2025 -0500
CAMEL-22686 Add handling of a WrappedFile body (#19892)
---
.../java/org/apache/camel/component/docling/DoclingProducer.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/components/camel-ai/camel-docling/src/main/java/org/apache/camel/component/docling/DoclingProducer.java b/components/camel-ai/camel-docling/src/main/java/org/apache/camel/component/docling/DoclingProducer.java
index 105d769db09b..5e6b75f42402 100644
--- a/components/camel-ai/camel-docling/src/main/java/org/apache/camel/component/docling/DoclingProducer.java
+++ b/components/camel-ai/camel-docling/src/main/java/org/apache/camel/component/docling/DoclingProducer.java
@@ -32,6 +32,7 @@ import java.util.stream.Collectors;
import org.apache.camel.Exchange;
import org.apache.camel.InvalidPayloadException;
+import org.apache.camel.WrappedFile;
import org.apache.camel.support.DefaultProducer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -710,6 +711,10 @@ public class DoclingProducer extends DefaultProducer {
File file = (File) body;
validateFileSize(file.getAbsolutePath());
return file.getAbsolutePath();
+ } else if (body instanceof WrappedFile<?> wf) {
+ File file = (File) wf.getFile();
+ validateFileSize(file.getAbsolutePath());
+ return file.getAbsolutePath();
}
throw new InvalidPayloadException(exchange, String.class);