-
Notifications
You must be signed in to change notification settings - Fork 299
Expand file tree
/
Copy pathapp.js
More file actions
26 lines (21 loc) · 778 Bytes
/
app.js
File metadata and controls
26 lines (21 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
'use strict';
var app = angular.module('ng-flow-sample', ['flow']);
app.config(['flowFactoryProvider', function (flowFactoryProvider) {
flowFactoryProvider.defaults = {
target: 'http://localhost:3000/upload',
permanentErrors: [404, 500, 501],
chunkRetryInterval: 5000,
simultaneousUploads: 4,
testChunks: false,
generateUniqueIdentifier: function(file) {
var getFileExt = function(fileName) {
var fileExt = fileName.split(".");
if ( fileExt.length === 1 || ( fileExt[0] === "" && fileExt.length === 2 )) {
return "";
}
return fileExt.pop();
};
return Date.now() + '.'+ getFileExt(file.name);
}
};
}]);