File Entity

A File contains uploaded data, like a photo, document or movie.

In Arweave File System, a single file is broken into 2 parts - its metadata and its data.

A File Entity Metadata Transaction does not include the actual File data it represents. Instead, the File data must be uploaded as a separate transaction, called the File data transaction. The File metadata transaction JSON references the File data transaction id for retrieval. This separation allows for file metadata to be updated without requiring the file data to be reuploaded.

It also ensures that private files, can have their Metadata Transaction JSON encrypted as well, ensuring nobody can see the file’s data and metadata.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ArFS: "0.11" Cipher?: "AES256-GCM" Cipher-IV?: "<12 byte initialization vector as Base64>" Content-Type: "<application/json | application/octet-stream>" Drive-Id: "<drive uuid>" Entity-Type: "file" File-Id: "<uuid>" Parent-Folder-Id: "<parent folder uuid>" Unix-Time: "<seconds since unix epoch>" Data JSON { "name": "<user defined file name with extension eg. happyBirthday.jpg>", "size": <computed file size - int>, "lastModifiedDate": <timestamp for OS reported time of file's last modified date represented as milliseconds since unix epoch - int> "dataTxId": "<transaction id of stored data>", "dataContentType": "<the mime type of the data associated with this file entity>" }

File Metadata Transaction example

The File data transaction contains limited information about the file, such as the information required to decrypt it or the Content-Type (mime-type) needed to view in the browser.

1 2 3 4 Cipher?: "AES256-GCM" Cipher-IV?: "<12 byte initialization vector as Base64>"" Content-Type: "<file mime-type | application/octet-stream>"" { File data }

File Data Transaction example