Downloaded File Name

68 views
Skip to first unread message

Onn Akbar Ali

unread,
Aug 26, 2015, 4:10:55 AM8/26/15
to Orthanc Users
Hii 

Quick question , as it stands now , if i download Dicom or zip file from orthanc the file naming system does not identify the patient. any way we can manipulate orthanc to name the file to the patients's ?

Sébastien Jodogne

unread,
Aug 26, 2015, 6:21:27 AM8/26/15
to Orthanc Users
Hello,

So far, the DICOM/ZIP files are named according to the identifiers that are used by Orthanc to identify the corresponding resources.

If you need control over this filename, you will have to implement a custom C/C++ plugin that:
  1. Installs a REST callback with "OrthancPluginRegisterRestCallback()"
  2. Downloads the DICOM/ZIP through "OrthancPluginRestApiGet()" into a memory buffer inside this callback
  3. Sets the HTTP header "Content-Disposition" to the value "filename=MyFileName.zip", through "OrthancPluginSetHttpHeader()"
  4. Outputs the buffer downloaded at step (2) using "OrthancPluginAnswerBuffer()"
HTH,
Sébastien-
Reply all
Reply to author
Forward
0 new messages