# Downloaded File Name

**URL:** https://discourse.orthanc-server.org/t/downloaded-file-name/246
**Category:** Google Groups archive
**Created:** [August 26, 2015, 8:10am UTC](https://discourse.orthanc-server.org/t/downloaded-file-name/246 "2015-08-26T08:10:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Onn\_Akbar\_Ali](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/o/6a8cbe/32.png) [@Onn\_Akbar\_Ali](https://discourse.orthanc-server.org/u/Onn_Akbar_Ali)
#### Post date: [August 26, 2015, 8:10am UTC](https://discourse.orthanc-server.org/t/downloaded-file-name/246/1 "2015-08-26T08:10:55Z")

</div>

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 ?

---

<div class="post-metadata">

### Author: ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)
#### Post date: [August 26, 2015, 10:21am UTC](https://discourse.orthanc-server.org/t/downloaded-file-name/246/2 "2015-08-26T10:21:26Z")

</div>

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-
