Disable Transferred Streams

I am using ng-flow directive to upload files to server. Is there a way that I can use the regular load instead of the loadload that is used in the ng-flow module?

+3


source to share


3 answers


Yes, you can set the testChunks: false property for the config stream, for example:



    var app = angular.module('app', ['flow']).
    config(['flowFactoryProvider', function (flowFactoryProvider) {
        flowFactoryProvider.defaults = {
            target: '/upload',
            permanentErrors: [404, 500, 501],
            maxChunkRetries: 1,
            chunkRetryInterval: 5000,
            simultaneousUploads: 4,
            testChunks: true
        };
    }]);

      

+3


source


You can set it chunkSize

to a very high value (eg 9007199254740992, the largest integer value in javascripts).



var app = angular.module('app', ['flow']).
config(['flowFactoryProvider', function (flowFactoryProvider) {
    flowFactoryProvider.defaults = {
        target: '/upload',
        permanentErrors: [404, 500, 501],
        chunkSize: 9007199254740992,
        maxChunkRetries: 1,
        chunkRetryInterval: 5000,
        testChunks: false
    };
}]);

      

+7


source


For me, both of these methods don't work. When I look at the doc I found a named config attribute testMethod

setting this to null to solve this for me:

var app = angular.module('app', ['flow']).
  config(['flowFactoryProvider', function (flowFactoryProvider) {
    flowFactoryProvider.defaults = {
      testMethod: null
  };
}]);

      

0


source







All Articles