Show basic picture preview in filemanager
This commit is contained in:
@@ -3085,6 +3085,11 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
if (type === 'volume') return 'volumes/' + id;
|
||||
}
|
||||
|
||||
Client.prototype.filesGetLink = function (id, type, path) {
|
||||
var objpath = getObjpath(id, type);
|
||||
return client.apiOrigin + '/api/v1/' + objpath + '/files/' + path + '?download=false&access_token=' + token;
|
||||
};
|
||||
|
||||
Client.prototype.filesGet = function (id, type, path, mode, callback) {
|
||||
var objpath = getObjpath(id, type);
|
||||
|
||||
@@ -3094,8 +3099,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
} else if (mode === 'open') {
|
||||
window.open(client.apiOrigin + '/api/v1/' + objpath + '/files/' + path + '?download=false&access_token=' + token);
|
||||
callback(null);
|
||||
} else if (mode === 'link') {
|
||||
callback(null, client.apiOrigin + '/api/v1/' + objpath + '/files/' + path + '?download=false&access_token=' + token);
|
||||
} else {
|
||||
function responseHandler(data, headers, status) {
|
||||
if (headers()['content-type'] && headers()['content-type'].indexOf('application/json') !== -1) return JSON.parse(data);
|
||||
|
||||
Reference in New Issue
Block a user