synapseutils.copyFileHandles requires fields that does not require at rest


Currently all arguments are required for this function but contentType and fileNames should be optional.




Larsson Omberg
February 26, 2019, 10:31 PM

I am not suggesting multiple optional parameters only that the two parameters are optional. It would be counterintuitive to create two additional functions that perform subtasks of this.

Kimyen Truong
February 26, 2019, 11:09 PM

, what I was suggesting is related to working with FileEntity, where the round trip would associate the new file handle back to the original entity.

In the use case you described above, with the BridgeExporter, you are working with file handles that are associate with TableEntity; and each file handle is a cell in the table, and does not associate directly with any FileEntity. Is this correct?

Kimyen Truong
February 26, 2019, 11:17 PM

In working with file handles that are associates with TableEntity, the current {{copyFileHandles()}}‌should be sufficient, since the additional step is not to re-associate the file handle back to the original FileEntity. Instead, the additional step is to set the new file handle Id as value in a cell in the a table.

This is a use case that we do support at REST:

… replace the fileName and contentType of the file if they are specified in the request

I will reopen this issue to fix it to have the designed behaviors.

Kimyen Truong
February 26, 2019, 11:56 PM

Notes to self: implementing a Synapse restful service is a core function of the Python client. This function should be available in the base package.

Thomas Yu
March 19, 2020, 2:49 AM

Looks good to me


Robert Minneker


Larsson Omberg




Thomas Yu

Development Area


Release Version History


Fix versions