Upload structure

An overview of upload structure

An Algorand transaction can include a note of up to 1024 bytes. When uploading a file, the content is split into multiple 1020 byte chunks. 4 bytes are reserved for a counter so the chunks can be reassembled in the correct order. The very first transaction is called the payload. The title, the original file size, the compression algorithm, the mime type, the encryption iv & tag, ... The payload contains all the metadata related to the actual upload. To read a file onchain, you just need to give the payload transaction id to the BlocknoteReader.

//Payload example:

payload: {
    title: "Sales report 2025",
    mime: "application/pdf",
    size: 19851,
    addid: 260321436,
    accid: 1583377570,
    compression: "brotli",
    txns: 16
  }

File revision

One of the most interesting core concepts of Blocknote is that it automatically builds a full history of every uploaded file. Each time content is updated, a new revision is written on-chain instead of replacing the previous one. Because the blockchain is immutable, all past versions are permanently preserved. This creates a complete, verifiable history of the file that can be retrieved at any time, while the BlocknoteReader returns the latest version by default.

Last updated