views:

45

answers:

2

If I send direct:report a byte[]. How do I find out the absolute path and name of the file it was written to?

from("direct:report").to("file:target/reports");
A: 

Use the "fileName" attribute to set the name explicitly. The path is relative to your container (junit, servicemix, etc)...so the full path to your file would be [container-root]/target/reports/[fileName]

BenODay
+3  A: 

The file producer will add an header with the key CamelFileNameProduced which contains the actual name of the file written.

The actual absolute filepath (path + name) for the output file that was written. This header is set by Camel and its purpose is providing end-users with the name of the file that was written.

Claus Ibsen