GoogleEventAttachment represents a file attachment on a Google Calendar event. It exposes metadata from the API response and provides lazy, cached download of the attachment binary via .getContent().
Attachments are accessed via the attachments property of a GoogleEvent object. To include attachments when creating or updating an event, set supportsAttachments: true in the request parameter.
A GoogleEventAttachment object exposes the following properties:
| Property | Type | Description |
|---|---|---|
| fileUrl | Text | URL to the attachment file. |
| title | Text | Display name of the attachment. |
| mimeType | Text | MIME type of the attachment. |
| iconLink | Text | URL to the attachment’s icon image. |
| contentBytes | 4D.Blob | Cached binary content of the attachment (populated after .getContent() is called). |
.getContent() : 4D.Blob
| Parameter | Type | Description | |
|---|---|---|---|
| Result | 4D.Blob | <- | The attachment binary; Null if the download fails. |
.getContent() downloads the attachment from fileUrl on first call and caches the result in contentBytes. Subsequent calls return the cached blob without making a new HTTP request.
.getIcon() : Picture
| Parameter | Type | Description | |
|---|---|---|---|
| Result | Picture | <- | The attachment icon as a 4D Picture; Null if the download fails. |
.getIcon() downloads the icon image from iconLink and converts the blob to a 4D Picture. The result is not cached — a new HTTP request is made on each call.