Support retry with optional overwrite

This commit is contained in:
Johannes Zellner
2020-10-22 12:45:05 +02:00
parent f586791c71
commit 4457b5879b
3 changed files with 34 additions and 15 deletions

View File

@@ -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));