File
A file attachment.
Property | Type | Required | Description |
---|---|---|---|
downloadUrl | url | Yes | The file’s download URL. |
name | string | Yes | The file’s name. |
description | string | No | The file’s description. |
sizeInBytes | numeric | No | The file’s size in bytes. |
mimeType | string | No | The file’s MIME type. |
createdAt | utcDateTime | Yes | The file’s creation date. |
lastModifiedAt | utcDateTime | Yes | The file’s last modified date. |
Formats
Section titled “Formats”A JSON example of this model.
{ "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"}
The JSON Schema for this model.
$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.
The TypeSpec code for this model.
/** A field representing a downloadable file. */@example(Examples.File.imageFile, #{ title: "An image file" })@example(Examples.File.pdfFile, #{ title: "A PDF file" })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;}