title: Using flowfile size as an argument in RouteOnAttribute nifi
body: <p>I want  to  know if is it possible to  use  flowfile size  as an  argument in  routeOnAttribute  i want to make  expression like that :</p>
  
  <pre><code>${filename.fileSize&gt;500}
  </code></pre>
  
  <p>but  it  tells me  that  expression  ought to  return true and my expression returns  string  what should   i do to be able to make new  connection in routeOnAttribute(p.s filename is my flowfile name)</p>
  
  <p><strong>EDIT 05/17/2019</strong> Correct answer is Andy's. That is the best guidance from us (Apache NiFi team) on the subject. The answer marked "correct" only applies in a few cases where <code>Content-Length</code> is set by an upstream processor. Andy's solution, <code>fileSize</code> is universally applicable.</p>