# File upload: bad format error

**URL:** https://discourse.orthanc-server.org/t/file-upload-bad-format-error/288
**Category:** Google Groups archive
**Created:** [November 9, 2015, 9:04am UTC](https://discourse.orthanc-server.org/t/file-upload-bad-format-error/288 "2015-11-09T09:04:28Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Javier\_Rodriguez](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/j/48db29/32.png) [@Javier\_Rodriguez](https://discourse.orthanc-server.org/u/Javier_Rodriguez)
#### Post date: [November 9, 2015, 9:04am UTC](https://discourse.orthanc-server.org/t/file-upload-bad-format-error/288/1 "2015-11-09T09:04:28Z")

</div>

Hi,

I’m trying to upload a dicom file (500 mb) to an Orthanc 0.9.4 server (Windows) through the web page but Orthanc throws the following error:

E1104 17:04:01.305105 MongooseServer.cpp:754] Exception in the HTTP handler: Bad file format

The file can be perfectly opened with a viewer like Ginkgo and If I convert it to JPEG2000 transfer syntax using dcm4che, Orthanc accepts the file.  
I also tried dcmcjpls with the +el option and Orthanc accepts the result file.

The original file is an Ultrasound Multiframe Image Storage and the transfer syntax UID is 1.2.840.10008.1.2.1 (Explicit VR Little Endian).

Am I missing something? Is there a way to obtain a more detailed output of the error?

Thanks in advance  
Javier

---

<div class="post-metadata">

### Author: ![Robert\_van\_Ommen](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/r/d26b3c/32.png) [@Robert\_van\_Ommen](https://discourse.orthanc-server.org/u/Robert_van_Ommen)
#### Post date: [November 9, 2015, 9:44am UTC](https://discourse.orthanc-server.org/t/file-upload-bad-format-error/288/2 "2015-11-09T09:44:53Z")

</div>

Start orthanc with the --trace and --verbose options. You will get more detailed output.

Regards,  
Robert

---

<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: [November 9, 2015, 10:16am UTC](https://discourse.orthanc-server.org/t/file-upload-bad-format-error/288/3 "2015-11-09T10:16:21Z")

</div>

Please also provide a sample problematic DICOM file. We cannot provide any help without it.

Regards,  
Sébastien-

---

<div class="post-metadata">

### Author: ![Javier\_Rodriguez](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/j/48db29/32.png) [@Javier\_Rodriguez](https://discourse.orthanc-server.org/u/Javier_Rodriguez)
#### Post date: [November 9, 2015, 11:23am UTC](https://discourse.orthanc-server.org/t/file-upload-bad-format-error/288/4 "2015-11-09T11:23:53Z")

</div>

Hi,

Thank you for the answers. I’ve tried to upload the file with the --trace and --verbose options but the output is almost the same:

I1109 11:33:53.948554 OrthancRestApi.cpp:81] Receiving a DICOM file of 511924248 bytes through HTTP  
E1109 11:33:54.221745 MongooseServer.cpp:754] Exception in the HTTP handler: Bad file format

This is the link to download the file I’m having problems with: [https://drive.google.com/file/d/0BwVfqehw50JvV1ZSWVV0eVh2TTg/view?usp=sharing](https://drive.google.com/file/d/0BwVfqehw50JvV1ZSWVV0eVh2TTg/view?usp=sharing)

Regards,  
Javier

---

<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: [November 9, 2015, 11:34am UTC](https://discourse.orthanc-server.org/t/file-upload-bad-format-error/288/5 "2015-11-09T11:34:35Z")

</div>

Hello,

I have successfully uploaded your DICOM file to Orthanc, both through “storescu” (i.e. through the DICOM protocol) and through the Web interface (i.e. through the REST API).

My Orthanc instance is compiled for Linux 64bit. Your problem is most probably related to the fact that you use the official Windows 32bit version of Orthanc, and that the system runs out of memory with such a large file.

We can only provide an official Windows 32bit release, as the Microsoft Visual Studio Express 2008 we use as part of our release process is not able to produce 64bit executable [1]. To solve your issue, you should thus try and compile Orthanc from source code by yourself, targeting a 64bit release.

HTH,  
Sébastien-

[1] [https://en.wikipedia.org/wiki/Microsoft\_Visual\_Studio\_Express#Visual\_C.2B.2B\_Express](https://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express#Visual_C.2B.2B_Express)

---

<div class="post-metadata">

### Author: ![Javier\_Rodriguez](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/j/48db29/32.png) [@Javier\_Rodriguez](https://discourse.orthanc-server.org/u/Javier_Rodriguez)
#### Post date: [November 9, 2015, 4:44pm UTC](https://discourse.orthanc-server.org/t/file-upload-bad-format-error/288/6 "2015-11-09T16:44:46Z")

</div>

Hi,

Installing Orthanc in a Debian server was one of my pending tasks so I did it today and It worked perfectly. If I have the chance I’ll try to compile Orthanc in a 64 bit Visual Studio version and I’ll let you know the result.

Thanks for the help,  
Javier
