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:
<div flow-init="{target: '/upload'}"
flow-files-submitted="$flow.upload()"
flow-file-success="$file.msg = $message">
<input type="file" flow-btn/>
Input OR Other element as upload button
<span class="btn" flow-btn>Upload File</span>
<table>
<tr ng-repeat="file in $flow.files">
<td>{{$index+1}}</td>
<td>{{file.name}}</td>
<td>{{file.msg}}</td>
</tr>
</table>
</div>
This appears to work and I can see the network request going out. I located flow.js upload file on click and attempted to follow the suggested answer, however $flow
was undefined in the respective function.
So, how does one programmatically upload files using ng-flow?