How to install a separate file in ng-stream

I need to use the single-file attribute in the ng stream, I have to use it because this attribute, which is different from the restrictions for the file number to send, replaces the thate file that was added before the download event, see this:

singleFile Enable single file upload. Once one file is uploaded, second file will overtake existing one, first one will be canceled. (Default: false) 

this is the documentation taken from the flow.js git repository.
What I really need to do is put this attribute in the factory, because I need to set this for the entire input field. I am trying to find it in the documentation for ng-stream, but there is not much explanation in it, does anyone know how to do this? Otherwise, does anyone know where to find the full good documentation of this module?

+7
javascript angularjs flow-js
source share
2 answers

You can try installing it like this:

 .config(['flowFactoryProvider', function (flowFactoryProvider) { flowFactoryProvider.defaults = { singleFile: true }; }]) 
+13
source share

Or using a tag like this:

 <div flow-init="{target: '/upload', singleFile: true}"></div> 
+15
source share

All Articles