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…
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:
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.
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.
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.