با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
نوع Mime
شمارشی که دسترسی به اعلانهای نوع MIME را بدون تایپ صریح رشتهها فراهم میکند. روشهایی که انتظار دارند یک نوع MIME بهعنوان رشته ارائه شود (مثلا 'image/png' ) هر یک از مقادیر زیر را نیز میپذیرند، تا زمانی که متد از نوع MIME اصلی پشتیبانی کند.
// Use MimeType enum to log the name of every Google Doc in the user's Drive.constdocs=DriveApp.getFilesByType(MimeType.GOOGLE_DOCS);while(docs.hasNext()){constdoc=docs.next();Logger.log(doc.getName());}// Use plain string to log the size of every PNG in the user's Drive.constpngs=DriveApp.getFilesByType('image/png');while(pngs.hasNext()){constpng=pngs.next();Logger.log(png.getSize());}
خواص
اموال
تایپ کنید
توضیحات
GOOGLE_APPS_SCRIPT
Enum
نمایش نوع MIME برای یک پروژه Google Apps Script.
GOOGLE_DRAWINGS
Enum
نمایش نوع MIME برای یک فایل Google Drawings.
GOOGLE_DOCS
Enum
نمایش نوع MIME برای یک فایل Google Docs.
GOOGLE_FORMS
Enum
نمایش نوع MIME برای یک فایل Google Forms.
GOOGLE_SHEETS
Enum
نمایش نوع MIME برای فایل Google Sheets.
GOOGLE_SITES
Enum
نمایش نوع MIME برای یک فایل Google Sites.
GOOGLE_SLIDES
Enum
نمایش نوع MIME برای فایل اسلایدهای Google.
FOLDER
Enum
نمایش نوع MIME برای یک پوشه Google Drive.
SHORTCUT
Enum
نمایش نوع MIME برای میانبر Google Drive.
BMP
Enum
نمایش نوع MIME برای یک فایل تصویری BMP (معمولا .bmp).
GIF
Enum
نمایش نوع MIME برای یک فایل تصویری GIF (معمولا .gif).
JPEG
Enum
نمایش نوع MIME برای یک فایل تصویری JPEG (معمولا .jpg).
PNG
Enum
نمایش نوع MIME برای یک فایل تصویری PNG (معمولاً .png).
SVG
Enum
نمایش نوع MIME برای یک فایل تصویری SVG (معمولا .svg).
PDF
Enum
نمایش نوع MIME برای یک فایل PDF (معمولا .pdf).
CSS
Enum
نمایش نوع MIME برای یک فایل متنی CSS (معمولا css.).
CSV
Enum
نمایش نوع MIME برای یک فایل متنی CSV (معمولا csv.).
HTML
Enum
نمایش نوع MIME برای یک فایل متنی HTML (معمولا .html).
JAVASCRIPT
Enum
نمایش نوع MIME برای یک فایل متنی جاوا اسکریپت (معمولا .js).
PLAIN_TEXT
Enum
نمایش نوع MIME برای یک فایل متنی ساده (معمولا txt.).
RTF
Enum
نمایش نوع MIME برای یک فایل متنی غنی (معمولا rtf.).
OPENDOCUMENT_GRAPHICS
Enum
نمایش نوع MIME برای یک فایل گرافیکی OpenDocument (معمولا odg.).
OPENDOCUMENT_PRESENTATION
Enum
نمایش نوع MIME برای فایل ارائه OpenDocument (معمولا odp.).
OPENDOCUMENT_SPREADSHEET
Enum
نمایش نوع MIME برای یک فایل صفحه گسترده OpenDocument (معمولا ods.).
OPENDOCUMENT_TEXT
Enum
نمایش نوع MIME برای یک فایل پردازش کلمه OpenDocument (معمولا odt.).
MICROSOFT_EXCEL
Enum
نمایش نوع MIME برای یک فایل صفحه گسترده مایکروسافت اکسل (معمولا xlsx.).
MICROSOFT_EXCEL_LEGACY
Enum
نمایش نوع MIME برای یک فایل قدیمی مایکروسافت اکسل (معمولا xls.).
MICROSOFT_POWERPOINT
Enum
نمایش نوع MIME برای یک فایل ارائه مایکروسافت پاورپوینت (معمولاً pptx.).
MICROSOFT_POWERPOINT_LEGACY
Enum
نمایش نوع MIME برای یک فایل قدیمی مایکروسافت پاورپوینت (معمولاً ppt.).
MICROSOFT_WORD
Enum
نمایش نوع MIME برای فایل سند Microsoft Word (معمولاً .docx).
MICROSOFT_WORD_LEGACY
Enum
نمایش نوع MIME برای یک فایل قدیمی Microsoft Word (معمولاً .doc).
ZIP
Enum
نمایش نوع MIME برای یک فایل آرشیو ZIP (معمولا .zip).
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003e\u003ccode\u003eMimeType\u003c/code\u003e is an enumeration providing access to MIME-type declarations without manually typing strings, offering a more convenient way to specify file types in Apps Script.\u003c/p\u003e\n"],["\u003cp\u003eMethods accepting MIME types as strings (e.g., \u003ccode\u003e'image/png'\u003c/code\u003e) also accept \u003ccode\u003eMimeType\u003c/code\u003e enum values if the underlying MIME type is supported.\u003c/p\u003e\n"],["\u003cp\u003eThis enumeration covers a wide range of file types, including Google Workspace files, common image and document formats, and Microsoft Office file types.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the provided property table for a comprehensive list of supported MIME types and their corresponding \u003ccode\u003eMimeType\u003c/code\u003e enum values.\u003c/p\u003e\n"]]],[],null,["# Enum MimeType\n\nMimeType\n\nAn enumeration that provides access to MIME-type declarations without typing the strings\nexplicitly. Methods that expect a MIME type rendered as a string (for example, `\n'image/png'`) also accept any of the values below, so long as the method supports the\nunderlying MIME type.\n\n```javascript\n// Use MimeType enum to log the name of every Google Doc in the user's Drive.\nconst docs = DriveApp.getFilesByType(MimeType.GOOGLE_DOCS);\nwhile (docs.hasNext()) {\n const doc = docs.next();\n Logger.log(doc.getName());\n}\n\n// Use plain string to log the size of every PNG in the user's Drive.\nconst pngs = DriveApp.getFilesByType('image/png');\nwhile (pngs.hasNext()) {\n const png = pngs.next();\n Logger.log(png.getSize());\n}\n``` \n\n### Properties\n\n| Property | Type | Description |\n|-------------------------------|--------|---------------------------------------------------------------------------------------------|\n| `GOOGLE_APPS_SCRIPT` | `Enum` | Representation of MIME type for a Google Apps Script project. |\n| `GOOGLE_DRAWINGS` | `Enum` | Representation of MIME type for a Google Drawings file. |\n| `GOOGLE_DOCS` | `Enum` | Representation of MIME type for a Google Docs file. |\n| `GOOGLE_FORMS` | `Enum` | Representation of MIME type for a Google Forms file. |\n| `GOOGLE_SHEETS` | `Enum` | Representation of MIME type for a Google Sheets file. |\n| `GOOGLE_SITES` | `Enum` | Representation of MIME type for a Google Sites file. |\n| `GOOGLE_SLIDES` | `Enum` | Representation of MIME type for a Google Slides file. |\n| `FOLDER` | `Enum` | Representation of MIME type for a Google Drive folder. |\n| `SHORTCUT` | `Enum` | Representation of MIME type for a Google Drive shortcut. |\n| `BMP` | `Enum` | Representation of MIME type for a BMP image file (typically .bmp). |\n| `GIF` | `Enum` | Representation of MIME type for a GIF image file (typically .gif). |\n| `JPEG` | `Enum` | Representation of MIME type for a JPEG image file (typically .jpg). |\n| `PNG` | `Enum` | Representation of MIME type for a PNG image file (typically .png). |\n| `SVG` | `Enum` | Representation of MIME type for an SVG image file (typically .svg). |\n| `PDF` | `Enum` | Representation of MIME type for a PDF file (typically .pdf). |\n| `CSS` | `Enum` | Representation of MIME type for a CSS text file (typically .css). |\n| `CSV` | `Enum` | Representation of MIME type for a CSV text file (typically .csv). |\n| `HTML` | `Enum` | Representation of MIME type for an HTML text file (typically .html). |\n| `JAVASCRIPT` | `Enum` | Representation of MIME type for a JavaScript text file (typically .js). |\n| `PLAIN_TEXT` | `Enum` | Representation of MIME type for a plain text file (typically .txt). |\n| `RTF` | `Enum` | Representation of MIME type for a rich text file (typically .rtf). |\n| `OPENDOCUMENT_GRAPHICS` | `Enum` | Representation of MIME type for an OpenDocument graphics file (typically .odg). |\n| `OPENDOCUMENT_PRESENTATION` | `Enum` | Representation of MIME type for an OpenDocument presentation file (typically .odp). |\n| `OPENDOCUMENT_SPREADSHEET` | `Enum` | Representation of MIME type for an OpenDocument spreadsheet file (typically .ods). |\n| `OPENDOCUMENT_TEXT` | `Enum` | Representation of MIME type for an OpenDocument word-processing file (typically .odt). |\n| `MICROSOFT_EXCEL` | `Enum` | Representation of MIME type for a Microsoft Excel spreadsheet file (typically .xlsx). |\n| `MICROSOFT_EXCEL_LEGACY` | `Enum` | Representation of MIME type for a Microsoft Excel legacy file (typically .xls). |\n| `MICROSOFT_POWERPOINT` | `Enum` | Representation of MIME type for a Microsoft PowerPoint presentation file (typically .pptx). |\n| `MICROSOFT_POWERPOINT_LEGACY` | `Enum` | Representation of MIME type for a Microsoft PowerPoint legacy file (typically .ppt). |\n| `MICROSOFT_WORD` | `Enum` | Representation of MIME type for a Microsoft Word document file (typically .docx). |\n| `MICROSOFT_WORD_LEGACY` | `Enum` | Representation of MIME type for a Microsoft Word legacy file (typically .doc). |\n| `ZIP` | `Enum` | Representation of MIME type for a ZIP archive file (typically .zip). |"]]