7

I need to use the single-file attribute in the ng-flow, i have to use it because this attribute other than limits the nuber of file to send, substitute the file thate was added until the upload 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 flow.js git repository.
What i really need to do is to put this attribute in the factory, because i need to set this for all my input file field. I have try to search it in the ng-flow documentation, but it lack of a lot of explanaion, anyone know how to do this? Otherwise anyone know where to find a complete good docummentation of this module?

4

2 回答 2

16

或者使用这样的标签:

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

于 2015-06-17T11:12:09.630 回答
13

您可以尝试这样设置:

.config(['flowFactoryProvider', function (flowFactoryProvider) {
    flowFactoryProvider.defaults = {
        singleFile: true
    };
}])
于 2014-06-13T02:26:14.227 回答