Managing Files
Stores allow you to exchange and save files. In this section, we'll take a closer look at file structures and how to manage them effectively. We'll also cover some best practices when working with Stores.
About Files
Along with a file's main content, additional metadata is stored to allow easy file management. Below is the structure of the metadata associated with each file:
field | type | encrypted | description |
---|---|---|---|
info | ServerFileInfo | yes | additional information assigned by the server e.g. author, creationDate , storeID and fileID |
publicMeta | binary | no | additional public information about the message, also accessible through Bridge API |
privateMeta | binary | yes | additional information about the message |
size | number | yes | The size of file in getBytes |
authorPubKey | string | yes | The public key of the author of the file |
statusCode | number | no | 0 if the file was decrypted successfully |
Listing Files
The sample code on this page is based on the same assumptions mentioned in Managing Stores.
Here's how you can retrieve and list files from a Store:
Deleting Files
Deleting a file is straightforward, but be aware that this action is irreversible:
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.
This is documentation for PrivMX v2.2, which is no longer actively maintained.