Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 the following use cases, users would like to download many files with a single request:

...

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 for some use cases.  For example, a user many need to download all of the files from a table entity with one or more file columns and all of the files could be small.

 

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 issued 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 in a more generic fashion.