File Node
File Node Overview
The File node is a PIN path specifically designed for storing files. Through the File node, users can securely store files on the blockchain in the form of PINs, achieving decentralized file storage and management.
Data Format
The PIN content for storing files follows this format:
Here, <file data>
contains the binary content of the file, and content-type
specifies the file's data type (for example, image/jpg;binary indicates a JPEG image file).
File Node Path
The path for the File node uses /file
as the base path and can further distinguish different files through file names or sub-paths. Through the File node path, users can easily locate and retrieve specific file PINs in the MetaID tree structure, thereby achieving effective organization and management of files.
File Referencing
In MetaID, file referencing is a fundamental business operation with critical importance. This feature allows users to reference existing on-chain file
data in application protocols, enhancing data connectivity and user experience. To achieve this, we define a special file referencing rule.
File Referencing Format
When referencing a file
in a sub-protocol, such as in the payload
, we use the following format:
Here, PINID
is the unique identifier of the file to be referenced. This format allows us to establish a reference link from the current protocol to a specific file
.
Example
For example, posting with an attached file:
The final on-chain content will be:
Last updated