Use gallery preview endpoints again since they have some additional details for SVG images
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
56e59908cc
commit
739ce553cf
|
@ -162,16 +162,10 @@ window.Gallery = window.Gallery || {};
|
|||
|
||||
/* jshint camelcase: false */
|
||||
var params = {
|
||||
fileId: fileId,
|
||||
width: longEdge,
|
||||
height: longEdge,
|
||||
a: 1
|
||||
};
|
||||
if (Gallery.token) {
|
||||
// TODO: return link for public pages
|
||||
return this.buildGalleryUrl('preview', '/' + fileId, params);
|
||||
}
|
||||
return OC.generateUrl('core/preview?fileId={fileId}&x={width}&y={width}&a={a}', params);
|
||||
return this.buildGalleryUrl('preview', '/' + fileId, params);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -129,11 +129,7 @@ function Thumbnail (fileId, square) {
|
|||
thumb.loadingDeferred.resolve(null);
|
||||
};
|
||||
var width = square ? 200 : 400;
|
||||
if (Gallery.token) {
|
||||
thumb.image.src = Gallery.utility.buildGalleryUrl('preview', '/' + id, {width: width, height: 200});
|
||||
} else {
|
||||
thumb.image.src = OC.generateUrl('core/preview?fileId={fileId}&x={width}&y={width}&a={a}', {fileId: id, width: width, a: 1});
|
||||
}
|
||||
thumb.image.src = Gallery.utility.buildGalleryUrl('preview', '/' + id, {width: width, height: 200});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -114,6 +114,7 @@ class PreviewController extends Controller {
|
|||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* Sends either a large preview of the requested file or the original file itself
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue