Can we trust the web uploader when using zip ?

148 views
Skip to first unread message

Francois Marot

unread,
Aug 24, 2021, 11:12:24 AM8/24/21
to Orthanc Users
Hello,

a colleague of mine recently tried to upload many large zip files to Orthanc using the built-in uploader. The result was a green "DONE", but in the browser's console he found errors (see the attached capture). So the question is: can we trust the build-in uploader when using zip ?
I fear that if some files in a zip are not accepted by Orthanc (bad dicom files or for whatever reason) the green "DONE" may still be displayed...

Best regards
Francois
orthanc.png

Sébastien Jodogne

unread,
Aug 24, 2021, 11:30:54 AM8/24/21
to Orthanc Users
Hello François,

Please provide a sample ZIP file that is problematic so that we can check whether Orthanc works as expected:

For reference, here is a direct link to the function "UploadDicomFile()" that is responsible for uncompressing the ZIP archives before adding them to the Orthanc database:

Summarizing, Orthanc ignores the files it can't import (i.e. non-DICOM files or broken DICOM files), but it will print an error in the log.

If you spot an non-intuitive behavior in this code, or if you have an idea how to improve it with respect to your expectations, please let us know.

Regards,
Sébastien-

Francois Marot

unread,
Aug 25, 2021, 3:35:40 PM8/25/21
to Orthanc Users
Thanks for your answer Sebastien,

I dig a bit more and found that:

* when uploading a single file with problem (non dicom or corrupted or corrupted zip): we correctly see a red FAILURE
* when uploading multiple files including one with problems (non dicom or corrupted or corrupted zip): we correctly see a red FAILURE
* when uploading a correct zip including some non-dicom or corrupted files: we receive a green DONE (which is a bit misleading but understandable, I do not see a better way as zip files often contain additional garbage, displaying FAILURE would bother users)

But there seems to be a problem when uploading multiple correct ZIP files if a network problem happens. For example, while uploading many files ZIP, if I disconnect from my VPN and then reconnect after a few seconds, some DICOM files are not sent but the green DONE is displayed. See my capture attached. I think this is a wrong behavior. The same test with raw dicom files is correct: a red FAILURE is displayed.
I suppose the handling of zip files is also specific on the client side leading to this problem.

This is not a huge problem and I think when you have many upload to do you should use the API with a script instead of manually using the browser, but I find it interesting to report.
orthanc-failed-requests.jpg

Sébastien Jodogne

unread,
Aug 27, 2021, 3:28:55 AM8/27/21
to Orthanc Users
Thanks for your investigation. I have just created an entry in our issue tracker:

From what I understand, the issue is not a problem within the Orthanc core, but an issue with the JavaScript library that is used to upload files from Orthanc Explorer to Orthanc, namely "jQuery File Upload Plugin 5.12":
https://github.com/blueimp/jQuery-File-Upload

This version of the library is very outdated (it is now at version 10.31.0), but upgrading it might raise compatibility issues with the other JavaScript libraries used in Orthanc Explorer.

We are really in the field of this FAQ entry:

I am unsure whether this issue will get fixed before creating a brand new "Orthanc Explorer 2", as the REST API is not affected by this issue and should be preferred in clinical deployments.

Regards,
Sébastien-
Reply all
Reply to author
Forward
0 new messages