Uploading DICOM files to Item: How to bypass the limit?


When uploading series of DICOM files into a single item, checking of already existing files misbehave after the 50 first files have been checked. All files after the 50th will be re-uploaded.

I’m using the following python client command:
client.upload(localDICOMFolder, DICOMFolder['_id'], parentType='folder', leafFoldersAsItems=True, reuseExisting=True, blacklist=None, dryRun=False)

Increasing the DEFAULT_PAGE_LIMIT in girder_client/init.py does not help. My guess is that the isFileCurrent() function (called from upload()) should use this variable to specify the request return limit. Changing line 804 of girder_client/init.py to the following does the trick:
itemFiles = self.get(path, parameters = {'offset':0, 'limit':DEFAULT_PAGE_LIMIT})

Not sure this is a bug or me using the upload function in a wrong way. Any idea?
By the way, is there any better way to define the DEFAULT_PAGE_LIMIT variable, other than changing it directly in the init.py script?

Thank you very much,


You have the right idea. It looks like a bug to me. I think the correct solution is to replace the lines _init_.py 839-840 with

itemFiles = self.listFile(itemId)

This will iterate through all files in the item.


Works well and much cleaner! Thanks a lot!