camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chrislovecnm <cl...@cnmconsulting.net>
Subject File endpoint getting actual filename ${file:nameonly}
Date Wed, 14 Mar 2012 16:24:33 GMT
How do I access the file name?  I have tried accessing the headers which gets
me ${file:nameonly} but not the file name itself.  How do I evaluate this?

Here is my route:


from("file:///u01/www/images/nonprofits-test?move=.done&preMove=.processing&filter=#nonpFileFilter&minDepth=2&recursive=true")
			
from("file:///u01/www/images/nonprofits-test?move=.done&preMove=.processing&filter=#nonpFileFilter&minDepth=2&recursive=true")
				.setHeader("test-this", simple("\${file:onlyname}"))
				.setHeader("test-this-again", constant("\${file:onlyname}"))
				.setHeader("test-this-again2", simple(CamelConstants.CAMEL_FILE_NAME))
				.setHeader("test-this-again3",
simple(CamelConstants.CAMEL_FILE_NAME_ONLY))
				

This is coded in grails / groovy so the \${file:name} should be evaluated to
${file:name}, but all I get is ${file:nameonly}. I also have the string in
java code, just in-case running it in groovy is playing havoc.

Thanks in advance

Chris

--
View this message in context: http://camel.465427.n5.nabble.com/File-endpoint-getting-actual-filename-file-nameonly-tp5565342p5565342.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message