FileMetadata
@forge/monorepo / backend/src / FileMetadata
Type Alias: FileMetadata
FileMetadata =
object
Defined in: backend/src/persistence/index.ts:1110
Properties
byteSize
readonlybyteSize:number
Defined in: backend/src/persistence/index.ts:1123
checksum?
readonlyoptionalchecksum?:string
Defined in: backend/src/persistence/index.ts:1134
Of the bytes as stored, so a read-back can be checked rather than assumed.
contentKey
readonlycontentKey:string
Defined in: backend/src/persistence/index.ts:1132
How the content store addresses the bytes. Opaque here.
Deliberately not derived from the filename or the id: a key a caller can construct is a key a caller
can guess, and sanitizeMediaRefs' comment in ShareFlow is the cautionary tale — its workspace-prefix
check was "the ONLY thing standing between a forged path and a signed URL to another tenant's private
object".
conversationId
readonlyconversationId:ConversationId
Defined in: backend/src/persistence/index.ts:1119
The conversation that owns it.
Ownership rather than association: AC-3 and AC-4 of #129 both follow from it — entitlement to the file is entitlement to the conversation, and deleting the conversation is what schedules the bytes. A file with no owner would need its own permission model, which is a second one to keep in step.
createdAt
readonlycreatedAt:string
Defined in: backend/src/persistence/index.ts:1139
deletedAt?
readonlyoptionaldeletedAt?:string
Defined in: backend/src/persistence/index.ts:1141
Soft delete. A row is kept so a reference to it resolves to "deleted" rather than to nothing.
extraction?
readonlyoptionalextraction?:FileExtraction
Defined in: backend/src/persistence/index.ts:1137
Extraction outcome (#131). Absent for a file nothing has tried to extract yet.
filename
readonlyfilename:string
Defined in: backend/src/persistence/index.ts:1121
As the user named it. Display only — never used to address the bytes.
id
readonlyid:FileId
Defined in: backend/src/persistence/index.ts:1111
mediaType
readonlymediaType:string
Defined in: backend/src/persistence/index.ts:1122
state
readonlystate:FileState
Defined in: backend/src/persistence/index.ts:1135
uploadedBy
readonlyuploadedBy:PrincipalId
Defined in: backend/src/persistence/index.ts:1138