From 57a525eb4fbbb842e9d8989990c3c6630ec65ebc Mon Sep 17 00:00:00 2001 From: Ryan Birmingham Date: Wed, 9 Nov 2022 11:02:51 -0500 Subject: [PATCH 1/2] insert token into url in loadImg --- core/CaMic.js | 1 + 1 file changed, 1 insertion(+) diff --git a/core/CaMic.js b/core/CaMic.js index ef8627d6..b4ae622c 100644 --- a/core/CaMic.js +++ b/core/CaMic.js @@ -171,6 +171,7 @@ class CaMic { let checkSlideUrl = '../../img/IIP/raw/?DeepZoom='+ data['location'] + '.dzi'; if (getCookie('token')) { checkSlideUrl = '../../img/IIP/raw/?token=' + getCookie('token') + '&DeepZoom='+ data['location'] + '.dzi'; + data.url = checkSlideUrl; } fetch(checkSlideUrl, {credentials: 'include'}).then((z)=>{ if (true) { From f4ac6d8b0bf10bb81f87ef65ca402f63c5924992 Mon Sep 17 00:00:00 2001 From: Ryan Birmingham Date: Wed, 9 Nov 2022 11:38:40 -0500 Subject: [PATCH 2/2] earlier url set --- core/CaMic.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/CaMic.js b/core/CaMic.js index b4ae622c..cacf65ea 100644 --- a/core/CaMic.js +++ b/core/CaMic.js @@ -171,7 +171,6 @@ class CaMic { let checkSlideUrl = '../../img/IIP/raw/?DeepZoom='+ data['location'] + '.dzi'; if (getCookie('token')) { checkSlideUrl = '../../img/IIP/raw/?token=' + getCookie('token') + '&DeepZoom='+ data['location'] + '.dzi'; - data.url = checkSlideUrl; } fetch(checkSlideUrl, {credentials: 'include'}).then((z)=>{ if (true) { @@ -223,7 +222,7 @@ class CaMic { }); imagingHelper.setMaxZoom(1); - data.url = '../../img/IIP/raw/?DeepZoom='+ data['location'] + '.dzi'; + data.url = openSlideUrl; data.slide = this.slideId; if (func && typeof func === 'function') func.call(null, data); Loading.text.textContent = `Loading Slide's Tiles...`;