title: Setting some header with current file name with Camel
body: <p>I am trying to set a header, "CamelAwsS3Key", with the current file name, before uploading the file to Amazon S3, but I am not able to get the current file name, here is the Spring snippet:</p>
  
  <pre><code>...
  &lt;to uri="file:D:/camel_out?fileName=foo_$simple{date:now:yyyyMMddHHmmss}.xml" /&gt;
  &lt;setHeader headerName="CamelAwsS3Key"&gt;
      &lt;simple&gt;${file:onlyname}&lt;/simple&gt;
  &lt;/setHeader&gt;
  &lt;to uri="aws-s3://bucket?accessKey=xxx&amp;amp;secretKey=yyy" /&gt;
  </code></pre>
  
  <p>Here is the message history (I removed useless columns):</p>
  
  <pre><code>...
  [to2       ] [file:D:/camel_out?fileName=foo_$simple{date:now:yyyyMMddHHmmss}.xml]  
  [setHeader1] [setHeader[CamelAwsS3Key]                                           ]  
  [to3       ] [aws-s3://bucket?accessKey=xxx&amp;secretKey=xxxxxx                     ] 
  </code></pre>
  
  <p>But the header is not set... From the log:</p>
  
  <pre><code>Exchange[
      ...
      Headers{... CamelAwsS3Key=null, CamelFileName=null, CamelFileNameProduced=D:\camel_out\foo_20150622124308.xml ...}
      ...
  ]
  </code></pre>
  
  <p>It works if I use a constant instead (the file is uploaded), like:</p>
  
  <pre><code>&lt;setHeader headerName="CamelAwsS3Key"&gt;
      &lt;constant&gt;test&lt;/constant&gt;
  &lt;/setHeader&gt;
  </code></pre>
  
  <p>How to set a header with the current file name?  </p>
  
  <p>Thanks!</p>