Upload own File
This use case takes a given file outside of enmeshed, encrypts and uploads it to the Backbone and creates a File with the respective metadata information for the Identity to access it.
The File can from now on be shared by references to other Identities.
This can be the truncatedReference
of the File itself, which is used, for example, when exchanging Files using Attributes, or the truncatedReference
of a Token.
In the latter case, the Token for the File must be created first.
Parameters
content
is the to-be-uploaded file content as byte array.filename
is the name of the file from the operating system.mimetype
of the respective file.- Optionally,
expiresAt
can be specified, which describes the ISODateTime the File expires. - Optionally, a
title
can be provided for the File. - Optional
description
of the File.
On Success
- An encrypted File is stored on the Backbone and can be shared by its references.
- Only the metadata of the File is stored locally.
- If
expiresAt
wasn’t specified, the expiration date of the File will be set to a default value that corresponds to zero o’clock on the 31st of December, 9999. - If
title
wasn’t provided, it will be set to an empty string""
as default value. - The created File is returned.
On Failure
- The parameters are malformed.
- The file size is too big.