filemanager: implement copy for files
This commit is contained in:
@@ -2815,6 +2815,17 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.filesCopy = function (id, type, path, newPath, callback) {
|
||||
var objpath = (type === 'app' ? 'apps/' : 'volumes/') + id;
|
||||
|
||||
put('/api/v1/' + objpath + '/files/' + path, { action: 'copy', newFilePath: newPath }, {}, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 200) return callback(new ClientError(status, data));
|
||||
|
||||
callback(null, data);
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.filesCreateDirectory = function (id, type, path, callback) {
|
||||
var objpath = (type === 'app' ? 'apps/' : 'volumes/') + id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user