This documentation uses flow type annotations.


Share one or several uploaded files with additional recipients.

function share(fileIds: Array<FileId>, options: SharingOptions): Promise<void>
fileIds: Array<FileId> The IDs of the files to share
options: SharingOptions An object defining the recipients of the sharing operation
Promise The promise is fulfilled once the operation is done
Throws Description
InvalidArgument Some recipients, or some file IDs have not been found
PreconditionFailed FileKit session has not been started
NetworkError Network error, e.g. connection lost or the Tanker server is not reachable


The shareWithUsers option allows you to specify who will be able to decrypt a file. If none is provided, only the user who uploaded the file will be able to decrypt it.

Fields Default Description
shareWithUsers: Array<string> [] The user public identities to share with (the current user's identity will be automatically appended)