Routes the file browser thumbnail requests through the authenticated Web proxy

This commit is contained in:
BinaryAlley committed 2026-08-29 16:35:12 +03:00
1 parent a32f80337b
commit f694882b46
15 files changed
+299 -35

No files matched your search

@@ -75,7 +75,6 @@
let explorerItemTemplate = null;
let pathSegmentTemplate = null;
let serverBasePath;
let clientBasePath;
let _path;
let pathSeparator = '/';
@@ -113,7 +112,6 @@
* @param {any} config The configuration of the file system browser, with the server and client base paths, the initial path, the initial view mode and icon size, and the optional theme asset URLs.
*/
async function initFileSystemBrowser(config) {
serverBasePath = config.serverBasePath;
clientBasePath = config.clientBasePath;
iconBaseUrl = config.iconBaseUrl || '';
fileIconsUrl = config.fileIconsUrl || '';
@@ -1468,8 +1466,8 @@
* @throws {Error} - Throws an error if the API call fails.
*/
async function getThumbnailApiCall(path, quality) {
// fetch the thumbnail for the given item from the server
const response = await fetch(`${serverBasePath}thumbnails/get-thumbnail?path=` + encodeURIComponent(path) + '&quality=' + quality, {
// fetch the thumbnail for the given item from the server, through the Web application, which proxies the request with the authentication of the current user
const response = await fetch(`${clientBasePath}thumbnails/api-get-thumbnail?path=` + encodeURIComponent(path) + '&quality=' + quality, {
signal: abortController.signal // use the abort signal
});
if (!response.ok)