{"name": string,"contentName": string,"contentType": string,"thumbnailUri": string,"downloadUri": string,"source": enum (Source),// Union field data_ref can be only one of the following:"attachmentDataRef": {object (AttachmentDataRef)},"driveDataRef": {object (DriveDataRef)}// End of list of possible types for union field data_ref.}
فیلدها
name
string
اختیاری. نام منبع پیوست، به شکل spaces/{space}/messages/{message}/attachments/{attachment} .
contentName
string
فقط خروجی نام فایل اصلی برای محتوا، نه مسیر کامل.
contentType
string
فقط خروجی نوع محتوا (نوع MIME) فایل.
thumbnailUri
string
فقط خروجی نشانی اینترنتی تصویر کوچکی که باید برای پیش نمایش پیوست یک کاربر انسانی استفاده شود. برنامههای گپ نباید از این نشانی اینترنتی برای دانلود محتوای پیوست استفاده کنند.
downloadUri
string
فقط خروجی URL دانلودی که باید از آن استفاده شود تا کاربر انسانی بتواند پیوست را دانلود کند. برنامههای گپ نباید از این نشانی اینترنتی برای دانلود محتوای پیوست استفاده کنند.
اختیاری. نام منبع داده های پیوست. این فیلد با API رسانه برای دانلود داده های پیوست استفاده می شود.
attachmentUploadToken
string
اختیاری. نشانه مات حاوی ارجاع به پیوست آپلود شده. توسط کلاینتها بهعنوان یک رشته غیرشفاف تلقی میشود و برای ایجاد یا بهروزرسانی پیامهای چت با پیوستها استفاده میشود.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eAn \u003ccode\u003eAttachment\u003c/code\u003e resource represents a file attached to a Google Chat message, containing metadata such as file name, content type, and source.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAttachment\u003c/code\u003e includes URLs for thumbnail preview and user download, but Chat apps should utilize the \u003ccode\u003edata_ref\u003c/code\u003e field for accessing content.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edata_ref\u003c/code\u003e field can point to either uploaded content within Chat (\u003ccode\u003eAttachmentDataRef\u003c/code\u003e) or a Google Drive file (\u003ccode\u003eDriveDataRef\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAttachmentDataRef\u003c/code\u003e is used by Chat apps to create/update messages with attachments or to download attachment data via the media API.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use the \u003ccode\u003eget\u003c/code\u003e method to retrieve metadata for a specific message attachment.\u003c/p\u003e\n"]]],["Attachments in Google Chat contain metadata and data references. Key information includes the attachment's `name`, `contentName`, `contentType`, `thumbnailUri`, and `downloadUri`. The `source` indicates if it's from Google Drive or uploaded to Chat. `AttachmentDataRef` provides a `resourceName` for media API downloads and an `attachmentUploadToken` for creating/updating messages with attachments. Methods to retrieve attachments metadata are detailed. The data source can be either a Drive file or uploaded content.\n"],null,[]]