mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 09:11:10 +00:00
Restores the authenticated thumbnail proxy call in the file browser dialog
This commit is contained in:
1 parent
30437030f9
commit
d73455eda2
1 file changed
+2
-4
@@ -75,7 +75,6 @@
|
|||||||
let explorerItemTemplate = null;
|
let explorerItemTemplate = null;
|
||||||
let pathSegmentTemplate = null;
|
let pathSegmentTemplate = null;
|
||||||
|
|
||||||
let serverBasePath;
|
|
||||||
let clientBasePath;
|
let clientBasePath;
|
||||||
let _path;
|
let _path;
|
||||||
let pathSeparator = '/';
|
let pathSeparator = '/';
|
||||||
@@ -113,7 +112,6 @@
|
|||||||
* @param {any} config The configuration of the file system browser.
|
* @param {any} config The configuration of the file system browser.
|
||||||
*/
|
*/
|
||||||
async function initFileSystemBrowser(config) {
|
async function initFileSystemBrowser(config) {
|
||||||
serverBasePath = config.serverBasePath;
|
|
||||||
clientBasePath = config.clientBasePath;
|
clientBasePath = config.clientBasePath;
|
||||||
iconBaseUrl = config.iconBaseUrl || '';
|
iconBaseUrl = config.iconBaseUrl || '';
|
||||||
fileIconsUrl = config.fileIconsUrl || '';
|
fileIconsUrl = config.fileIconsUrl || '';
|
||||||
@@ -1470,8 +1468,8 @@
|
|||||||
* @throws {Error} - Throws an error if the API call fails.
|
* @throws {Error} - Throws an error if the API call fails.
|
||||||
*/
|
*/
|
||||||
async function getThumbnailApiCall(path, quality) {
|
async function getThumbnailApiCall(path, quality) {
|
||||||
// fetch the thumbnail for the given item from the server
|
// 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(`${serverBasePath}thumbnails/get-thumbnail?path=` + encodeURIComponent(path) + '&quality=' + quality, {
|
const response = await fetch(`${clientBasePath}thumbnails/api-get-thumbnail?path=` + encodeURIComponent(path) + '&quality=' + quality, {
|
||||||
signal: abortController.signal // use the abort signal
|
signal: abortController.signal // use the abort signal
|
||||||
});
|
});
|
||||||
if (!response.ok)
|
if (!response.ok)
|
||||||
|
|||||||
Reference in new issue
Block a user