Skip to end of banner
Go to start of banner

Bulk File Download

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Currently, each file in Synapse must be downloaded individually.  This works well for many use cases but there are cases where this leads to performance issues.  For example, to download a file a client must first request a per-signed URL for the file.  The file is then downloaded with a HTTP GET on the URL.  For a small file, the request for the pre-signed URL can take as long as the actual file download.  This can be significant bottleneck some use cases.  For example, a user may need to download all of the files from a table entity with one or more file columns.  If all of the files are small then most of the time can be spent requesting pre-signed URLs.

 

There is also a secondary issue with the current implementation of file download in Synapse.  Since files do not have any type of Access Control List (ACL) or other mechanism for controlling download permission, only the creator of the file handle can directly download the file using the file handle id.  In order to make a file available to download the creator must first associate the file handle with an object that does have an ACL, such as a FileEntity, TableEntity, or WikiPage.  A pre-signed URL can be requested for an associated file using a service call through the owning object.  For example to get the pre-signed URL for a FileEntity, a client must use GET /entity/<entity_id>/file.  If the caller has the download permission on <entity_id> then Synapse will return a pre-signed URL for the associated file handle.  This means we need to add special service calls for each type of file handle association.

 

The API would be simpler to use if clients could simply get pre-signed URLs using only the file handle ID.  This would allow all clients to handle file downloads generically.

  • No labels