Show basic picture preview in filemanager

This commit is contained in:
Johannes Zellner
2022-04-07 16:11:04 +02:00
parent 347557c6ae
commit f282deffd5
4 changed files with 21 additions and 14 deletions

View File

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