diff --git a/Block Records.go b/Block Records.go index a921a07..fae2bac 100644 --- a/Block Records.go +++ b/Block Records.go @@ -9,8 +9,8 @@ File records: Offset Size Info 0 32 Hash blake3 of the file content 32 16 File ID -48 1 File Type (low-level) -49 2 File Format (high-level) +48 1 File Type +49 2 File Format 51 8 File Size 59 2 Count of Tags 61 ? Tags @@ -54,8 +54,8 @@ const ( type BlockRecordFile struct { Hash []byte // Hash of the file data ID uuid.UUID // ID - Type uint8 // Type (low-level) - Format uint16 // Format (high-level) + Type uint8 // File Type + Format uint16 // File Format Size uint64 // Size of the file data TagsRaw []BlockRecordFileTag // Tags to provide additional metadata TagsDecoded []interface{} // Decoded tags. See FileTagX structures. diff --git a/File Formats.go b/File Formats.go index c85933f..afabf9e 100644 --- a/File Formats.go +++ b/File Formats.go @@ -8,7 +8,7 @@ Definition of all recognized file formats. This file is likely being updated mor package core -// Low-level content types of file data. This is a copy from Intelligence X. +// General content types of data. const ( TypeBinary = iota // Binary/unspecified TypeText // Plain text @@ -20,9 +20,10 @@ const ( TypeContainer // Container files like ZIP, RAR, TAR TypeCompressed // Compressed files like GZ, BZ TypeFolder // Virtual folder + TypeEbook // Ebook ) -// High-level file types. New ones may be added as required. +// File formats. New ones may be added to the list as required. const ( FormatBinary = iota // Binary/unspecified FormatPDF // PDF document diff --git a/webapi/Blockchain.go b/webapi/Blockchain.go index 4e6753b..73bcc71 100644 --- a/webapi/Blockchain.go +++ b/webapi/Blockchain.go @@ -123,8 +123,8 @@ type apiFileTagRaw struct { type apiBlockRecordFile struct { ID uuid.UUID `json:"id"` // Unique ID. Hash []byte `json:"hash"` // Blake3 hash of the file data - Type uint8 `json:"type"` // Type (low-level) - Format uint16 `json:"format"` // Format (high-level) + Type uint8 `json:"type"` // File Type. For example audio or document. See TypeX. + Format uint16 `json:"format"` // File Format. This is more granular, for example PDF or Word file. See FormatX. Size uint64 `json:"size"` // Size of the file Folder string `json:"folder"` // Folder, optional Name string `json:"name"` // Name of the file diff --git a/webapi/readme.md b/webapi/readme.md index 3990b25..0676e07 100644 --- a/webapi/readme.md +++ b/webapi/readme.md @@ -175,8 +175,8 @@ type apiBlockRecordProfileBlob struct { type apiBlockRecordFile struct { ID uuid.UUID `json:"id"` // Unique ID. Hash []byte `json:"hash"` // Blake3 hash of the file data - Type uint8 `json:"type"` // Type (low-level) - Format uint16 `json:"format"` // Format (high-level) + Type uint8 `json:"type"` // File Type. For example audio or document. See TypeX. + Format uint16 `json:"format"` // File Format. This is more granular, for example PDF or Word file. See FormatX. Size uint64 `json:"size"` // Size of the file Folder string `json:"folder"` // Folder, optional Name string `json:"name"` // Name of the file