فراداده یا محتوای یک فایل را با شناسه دریافت می کند.
اگر پارامتر URL alt=media را ارائه دهید، پاسخ شامل محتوای فایل در بدنه پاسخ می شود. دانلود محتوا با alt=media فقط در صورتی کار می کند که فایل در Drive ذخیره شده باشد. برای دانلود Google Docs، Sheets و Slides به جای آن files.export استفاده کنید. برای اطلاعات بیشتر، دانلود و صادر کردن فایلها را ببینید.
درخواست HTTP
GET https://www.googleapis.com/drive/v2/files/{fileId}
این که آیا کاربر خطر دانلود بدافزار شناخته شده یا سایر فایل های توهین آمیز را تأیید می کند. این تنها زمانی قابل اعمال است که پارامتر alt روی media تنظیم شده باشد و کاربر مالک فایل یا سازمان دهنده درایو مشترکی باشد که فایل در آن قرار دارد.
تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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"]],["تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی."],[[["Retrieves metadata and content of a file using its ID via the Drive API."],["Download the file content within the response by providing `alt=media` in the URL."],["Requires specific authorization scopes for access, like `https://www.googleapis.com/auth/drive` or `https://www.googleapis.com/auth/drive.file`."],["Offers query parameters to acknowledge risk when downloading files, specify revision for download, or manage Drive support and view permissions."],["When downloading Google Docs, Sheets, or Slides, utilize `files.export` instead of `alt=media`."]]],["This API retrieves file metadata or content using a `GET` request to `https://www.googleapis.com/drive/v2/files/{fileId}`. The `fileId` path parameter specifies the target file. The response can include file content if `alt=media` is in the query parameters. `acknowledgeAbuse` and other query parameters control file handling. The request body is empty. Successful responses include a `File` instance, and it requires specific authorization scopes, such as `drive` or `drive.readonly`.\n"]]