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 105d769db09b8..5e6b75f42402d 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 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 @@ private String getInputPath(Exchange exchange) throws InvalidPayloadException, I 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);