File Upload

Files in Synapse are versionable. Please see Files and Versioning for more information about how versions in Files work.

Preliminaries:

Uploading a New Version

Uploading a new version follows the same steps as uploading a file for the first time - use the same file name and store it in the same location (e.g., the same parentId). It is recommended to add a comment to the new version in order to easily track differences at a glance. The example file testUpload.txt will now have a version of 2 and a comment describing the change.

Explicit example:

Implicit example:

Updating Annotations or Provenance without Changing Versions

Any change to a File will automatically update its version. If this isn’t the desired behavior, such as minor changes to the metadata, you can set forceVersion=FALSE with the Python client.

Important: Because Provenance is tracked by version, set forceVersion=FALSE for minor changes to avoid breaking Provenance.

Setting Provenance without Changing Version

To set Provenance without changing the file version:

Downloading a Specific Version

By default, the File downloaded will always be the most recent version. However, a specific version can be downloaded by passing the version parameter:

entity <- synGet(file_id, version = 1)