Create a FileData object.
Defaults to v2 format (content as single string). Pass fileFormat: "v1" for
backward compatibility with older readers during a rolling deployment.
Binary content (Uint8Array) is only supported with v2.
createFileData(
content: string | Uint8Array<ArrayBufferLike>,
createdAt: string,
fileFormat: "v1" | "v2" = "v2",
mimeType: string
): FileData| Name | Type | Description |
|---|---|---|
content* | string | Uint8Array<ArrayBufferLike> | File content as a string or binary Uint8Array (v2 only) |
createdAt | string | Optional creation timestamp (ISO format), defaults to now |
fileFormat | "v1" | "v2" | Default: "v2"Storage format: "v2" (default) or "v1" (legacy line array) |
mimeType | string |