diff Applications/StoneWebViewer/WebApplication/app.js @ 1843:251d7f7a6c4e

New configuration option "DownloadDicomDir" in Stone Web viewer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 24 Jun 2021 14:30:00 +0200
parents 9568082ee013
children 023cce3d7844
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebApplication/app.js	Thu Jun 24 14:19:36 2021 +0200
+++ b/Applications/StoneWebViewer/WebApplication/app.js	Thu Jun 24 14:30:00 2021 +0200
@@ -401,7 +401,7 @@
       creatingArchive: false,
       archiveJob: '',
       mouseTool: 0,
-      orthancSystem: {},  // Only available if "DicomWebRoot" configuration option is set
+      orthancSystem: {},  // Only available if "OrthancApiRoot" configuration option is set
       stoneWebViewerVersion: '...',
       emscriptenVersion: '...',
 
@@ -1011,7 +1011,13 @@
           }
           else {
             var orthancId = response.data[0]['ID'];
-            var uri = that.globalConfiguration.OrthancApiRoot + '/studies/' + orthancId + '/archive';
+            
+            var uri = that.globalConfiguration.OrthancApiRoot + '/studies/' + orthancId;
+            if (that.globalConfiguration.DownloadDicomDir === true) {
+              uri = uri + '/media';
+            } else {
+              uri = uri + '/archive';
+            }
 
             if (that.orthancSystem.ApiVersion >= 13) {
               // ZIP streaming is available (this is Orthanc >=