Support retry with optional overwrite
This commit is contained in:
@@ -2630,10 +2630,12 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.filesUpload = function (appId, path, file, progressHandler, callback) {
|
||||
Client.prototype.filesUpload = function (appId, path, file, overwrite, progressHandler, callback) {
|
||||
var fd = new FormData();
|
||||
fd.append('file', file);
|
||||
|
||||
if (overwrite) fd.append('overwrite', 'true');
|
||||
|
||||
function done(error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 200) return callback(new ClientError(status, data));
|
||||
|
||||
Reference in New Issue
Block a user