Questiona about study download from Stone Viewer, download is named "archive". No .zip or meaningful name.

Noticed something with the Stone Viewer Download button. I am hosting the front-end, but it seems to be an issue with the native plug-in also.

I think the relevant code is below in app.js. My app.ApiVersion is 15, so it must be executing the “window.location.href = uri;” It does download the data, but the filename is just “archive” (in FireFox). The data is OK because if I add the .zip extension after download and unzip it it is not corrupted. I think it is also related to the browser and possibly the OS because when I use chrome the filename is “archive.zip”, whereas with FireFox it is just “archive”.

Wondering if there is a way to explicitly give a filename there (e.g. PatientID, AccessionNumber or something similar) along with the .zip extension.

if (that.orthancSystem.ApiVersion >= 13) {
// ZIP streaming is available (this is Orthanc >=
// 1.9.4): Simply give the hand to Orthanc
event.preventDefault();
window.location.href = uri;

} else {
// ZIP streaming is not available: Create a job to create the archive
axios.post(uri, {
‘Asynchronous’ : true
})
.then(function(response) {
that.creatingArchive = true;
that.archiveJob = response.data.ID;
setTimeout(that.CheckIsDownloadComplete, 1000);
});
}

Stephen D. Scotti

Hi Stephen,

I just tested this both with Firefox and Chrome and, I’m actually getting a uuid.zip file with both browsers.

However, if I force the execution of the second “else” branch, I indeed get an ‘archive’ file with firefox and an ‘archive.zip’ file with Chrome.

Could you double check that your ApiVersion is really >= 13 ?

BTW, I’ve now forced the filename in Orthanc output also for asynchronous jobs since the Content-Disposition header was missing (https://hg.orthanc-server.com/orthanc/rev/0a38000b086d)

image.png