Can we trust the web uploader when using zip ?

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

Hello François,

Please provide a sample ZIP file that is problematic so that we can check whether Orthanc works as expected:
https://book.orthanc-server.com/users/support.html#discussing-a-minimal-working-example

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:

https://hg.orthanc-server.com/orthanc/file/Orthanc-1.9.6/OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp#l181

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-

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

Thanks for your investigation. I have just created an entry in our issue tracker:
https://bugs.orthanc-server.com/show_bug.cgi?id=201

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:
https://book.orthanc-server.com/faq/improving-interface.html

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-