Mercurial > hg > orthanc-webviewer
diff WebApplication/viewer.js @ 185:3e45f3752074
Fix download of DICOM instance from the toolbox
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 13 Mar 2018 10:24:38 +0100 |
parents | 81f16c5667ba |
children | 2f27287c047c |
line wrap: on
line diff
--- a/WebApplication/viewer.js Fri Jan 05 16:39:45 2018 +0100 +++ b/WebApplication/viewer.js Tue Mar 13 10:24:38 2018 +0100 @@ -161,7 +161,15 @@ iframe.style.display = 'none'; document.body.appendChild(iframe); } - iframe.src = '../../instances/' + instance + '/file'; + + var id = instance; + var pos = instance.indexOf('_'); + if (pos != -1) { + // Remove the frame index (after the underscore) + id = id.substring(0, pos); + } + + iframe.src = '../../instances/' + id + '/file'; }