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 | number | No | The file's size in bytes. |
| mimeType | string | No | The file's MIME type. |
| createdAt | utcDateTime | Yes | The timestamp (in UTC) at which the record was created. |
| lastModifiedAt | utcDateTime | Yes | The timestamp (in UTC) at which the record was last modified. |
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.000Z", "lastModifiedAt": "2025-01-02T17:30:00.000Z"}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 - lastModifiedAtunevaluatedProperties: not: {}examples: - 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" })@Versioning.added(CommonGrants.Versions.v0_2)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;}Changelog
Section titled “Changelog”| Version | Changes |
|---|---|
| 0.2.0 |
|