Add new file creation action and collapse new and upload actions
This commit is contained in:
@@ -2621,6 +2621,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.filesCreateFile = function (appId, path, callback) {
|
||||
post('/api/v1/apps/' + appId + '/files/' + path, {}, {}, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 200) return callback(new ClientError(status, data));
|
||||
|
||||
callback(null, data);
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.filesUpload = function (appId, path, file, progressHandler, callback) {
|
||||
var fd = new FormData();
|
||||
fd.append('file', file);
|
||||
|
||||
Reference in New Issue
Block a user