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 reference.truncated of the File itself, which is used, for example, when exchanging Files using Attributes, or the reference.truncated of a Token.
In the latter case, the Token for the File must be created first.
Parameters
contentis the to-be-uploaded file content as byte array.filenameis the name of the file from the operating system.mimetypeof the respective file.- Optionally,
expiresAtcan be specified, which describes the ISODateTime the File expires. - Optionally, a
titlecan be provided for the File. - Optionally, a
descriptioncan be provided for the File. - Optionally,
tagscan be provided for 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
expiresAtwasn’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
titlewasn’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.