Create filehandle copies in synapseutils.copy instead of downloading

Description

None

Environment

None

Activity

Show:
Larsson Omberg
June 8, 2017, 7:48 PM

Looking at code seems to indicate that it is gone.

Thomas Yu
November 9, 2016, 9:37 PM
Edited

Dear Larsson,

Thanks for all the help. I did this,

but I'm getting these errors:

I can open a PLFM unless its an error on how I structured the list

Larsson Omberg
November 9, 2016, 5:30 PM

1) copyRequests should be a list according to http://docs.synapse.org/rest/org/sagebionetworks/repo/model/file/BatchFileHandleCopyRequest.html

2) The file belongs to the entity not the annotations. I.e. don't use "associateObjectId":bundle['annotations']['id'] but "associateObjectId":bundle['entity']['id']

3) All filehandle interactions are not to the regular repo endpoint but the file endpoint, i.e.

syn.restPOST('/filehandles/copy', ..., endpoint=syn.fileHandleEndpoint)

Thomas Yu
November 9, 2016, 8:46 AM

Take this for example:

It gives this error:

Larsson Omberg
November 9, 2016, 8:05 AM

@thomas yu: "associateObjectId":fileHandle['id'] should be:
"associateObjectId":bundle['id']

Fixed

Assignee

Thomas Yu

Reporter

Larsson Omberg

Labels

None

Validator

Larsson Omberg

Development Area

None

Release Version History

None

Slack Channel

None

Fix versions

Priority

Major