issue # 21

Hi. Can someone help me about this problem. I have installed the orthanc and have not changed the setting except the storage to C:/Images. I keep on getting this error when I press the upload button and when I drag the images and start to upload, the upload fails.

issue #21.png

I have been using Orthanc for some time now and upload the files using the web GUI never worked for me.
Orthanc provide a python script to import the dicom files. Use this way, no problems. Or use C-STORE dicom protocol.

Im sorry but im not that familiar with python and I didnt see any .py files. Can you help how to use this

Here it is:

You can use any other HTTP client (e.g. cURL) to do the same if you

Issue #21:

Where do I put this file? Do I have to save this to the orthanc server folder? I have to install the python software right? Sorry this is the first time ill be using this program.

This bug only affects Firefox. Simply use another browser, acknowledge the alert, drop your files and click upload.

Yes I have tried it but after I started the upload the upload fails.

Alain replied a solution I’ve forgot to comment.

In case you don’t want to use other browser:

Yes, you need to install python and the library http2lib (in case it is not installed already)
You can put this file anywhere. i will only execute manually.

Here is the file

Don’t hesitate to post any problem.

To Norman and everyone who’ll stumble on this thread in the future: make sure you install Python 2. As far as I know, any 2.x.x will do.

There are some changes concerning base64 as of 3.x.x that will give you a mild headache while fixing it. And base64 is part of the when it comes to the Authorization header. I believe it’s not a problem if your Orthanc is open.

So unless your Orthanc is not secured, just go with python 2.x.x.

In case you must (or dearly want to) run Python 3.x.x, I’ve attached my version of with the base64 part corrected.

This is the link that details the answer:

Have a good one =) (3.67 KB)

Hi everyone, I have run the the importdicom file for python 3.x.x but i still can upload the files? how do I upload the files after I run the .py file?

It looks like you’re problem is not related to the way you push/upload the files but you might have more fundamental issues in your install. Could you describe your problems more accurately ?

When you say files do not upload, do you have any error message/feedback in the browser interface ? Or in the python script output ?
Could you check the Orthanc logs ? (
What is your setup (Windows/Linux, how have you configured Orthanc …) ?

Hi, Norman!

To upload the files you need to pass certain parameters to the scrip. This is the default help message:

[valmont@Inspiron-7560 Downloads]$ python3

Sample script to recursively import in Orthanc all the DICOM files
that are stored in some path. Please make sure that Orthanc is running
before starting this script. The files are uploaded through the REST

Usage: [hostname] [HTTP port] [path]
Usage: [hostname] [HTTP port] [path] [username] [password]
For instance: 8042 .

[valmont@Inspiron-7560 Downloads]$

So, suppose you’ve cd’ed into the Downloads directory and that in this directory lie the “dicomImages”’ directory containing the images you want to upload. Further suppose your Orthanc is running on host on port 8042 and you have not configured basic authentication. You’ll want to run like so:

$ python3 8042 dicomImages

Let me know if you need further assistance.

Thanks! =)

Hi everyone, I would like to thank everyone that help me. It is now working perfectly. Again thank you for all your help