title: ng-flow upload programmatically
body: <p>I am currently using ng-flow to perform a file upload. It appears that the default action of selecting a file is to upload immediately. I'd like to override this so that files are selected and only uploaded on button click. Perhaps I am misreading the documentation, but thus far I have the following:</p>
  
  <pre><code>&lt;div flow-init="{target: '/upload'}"
       flow-files-submitted="$flow.upload()"
       flow-file-success="$file.msg = $message"&gt;
  
    &lt;input type="file" flow-btn/&gt;
    Input OR Other element as upload button
    &lt;span class="btn" flow-btn&gt;Upload File&lt;/span&gt;
  
    &lt;table&gt;
      &lt;tr ng-repeat="file in $flow.files"&gt;
          &lt;td&gt;{{$index+1}}&lt;/td&gt;
          &lt;td&gt;{{file.name}}&lt;/td&gt;
          &lt;td&gt;{{file.msg}}&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This appears to work and I can see the network request going out. I located <a href="https://stackoverflow.com/questions/25740110/flow-js-upload-file-on-click">flow.js upload file on click</a> and attempted to follow the suggested answer, however <code>$flow</code> was undefined in the respective function.</p>
  
  <p>So, how does one programmatically upload files using ng-flow?</p>