File
A downloadable file.
A field representing a downloadable file.
| Property | Type | Required | Description |
|---|---|---|---|
downloadUrl | string | Yes | The file's download URL. |
name | string | Yes | The file's name. |
description | string | No | The file's description. |
sizeInBytes | number | No | The file's size in bytes. |
mimeType | string | No | The file's MIME type. |
createdAt | string | Yes | The timestamp (in UTC) at which the record was created. |
lastModifiedAt | string | Yes | The timestamp (in UTC) at which the record was last modified. |
{ "downloadUrl": "https://example.com/file.pdf", "name": "example.pdf", "description": "A PDF file with instructions", "sizeInBytes": 1000, "mimeType": "application/pdf", "createdAt": "2025-01-01T17:01:01", "lastModifiedAt": "2025-01-02T17:30:00"}$schema: https://json-schema.org/draft/2020-12/schema$id: File.yamltype: objectproperties: downloadUrl: type: string format: uri description: The file's download URL. name: type: string description: The file's name. description: type: string description: The file's description. sizeInBytes: type: number description: The file's size in bytes. mimeType: type: string description: The file's MIME type. createdAt: type: string format: date-time description: The timestamp (in UTC) at which the record was created. lastModifiedAt: type: string format: date-time description: The timestamp (in UTC) at which the record was last modified.required: - downloadUrl - name - createdAt - lastModifiedAtexamples: - downloadUrl: https://example.com/file.pdf name: example.pdf description: A PDF file with instructions sizeInBytes: 1000 mimeType: application/pdf createdAt: 2025-01-01T17:01:01 lastModifiedAt: 2025-01-02T17:30:00 - downloadUrl: https://example.com/image.png name: image.png sizeInBytes: 1000 mimeType: image/png createdAt: 2025-01-01T17:01:01 lastModifiedAt: 2025-01-02T17:30:00description: A field representing a downloadable file./** A field representing a downloadable file. */@example(Examples.File.imageFile, #{ title: "An image file" })@example(Examples.File.pdfFile, #{ title: "A PDF file" })@Versioning.added(Versions.v0_1)model File { /** The file's download URL. */ downloadUrl: url;
/** The file's name. */ name: string;
/** The file's description. */ description?: string;
/** The file's size in bytes. */ sizeInBytes?: numeric;
/** The file's MIME type. */ mimeType?: string;
/** The system metadata for the file. */ ...Fields.SystemMetadata;}