문자열을 명시적으로 입력하지 않고도 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
Google Apps Script 프로젝트의 MIME 유형 표현입니다.
GOOGLE_DRAWINGS
Enum
Google Drawings 파일의 MIME 유형 표현입니다.
GOOGLE_DOCS
Enum
Google Docs 파일의 MIME 유형 표현입니다.
GOOGLE_FORMS
Enum
Google Forms 파일의 MIME 유형 표현입니다.
GOOGLE_SHEETS
Enum
Google Sheets 파일의 MIME 유형 표현입니다.
GOOGLE_SITES
Enum
Google Sites 파일의 MIME 유형 표현입니다.
GOOGLE_SLIDES
Enum
Google Slides 파일의 MIME 유형 표현입니다.
FOLDER
Enum
Google Drive 폴더의 MIME 유형 표현입니다.
SHORTCUT
Enum
Google Drive 바로가기의 MIME 유형 표현입니다.
BMP
Enum
BMP 이미지 파일 (일반적으로 .bmp)의 MIME 유형 표현입니다.
GIF
Enum
GIF 이미지 파일 (일반적으로 .gif)의 MIME 유형 표현입니다.
JPEG
Enum
JPEG 이미지 파일 (일반적으로 .jpg)의 MIME 유형 표현입니다.
PNG
Enum
PNG 이미지 파일의 MIME 유형 표현 (일반적으로 .png)입니다.
SVG
Enum
SVG 이미지 파일 (일반적으로 .svg)의 MIME 유형 표현입니다.
PDF
Enum
PDF 파일의 MIME 유형 표현 (일반적으로 .pdf)입니다.
CSS
Enum
CSS 텍스트 파일 (일반적으로 .css)의 MIME 유형 표현입니다.
CSV
Enum
CSV 텍스트 파일 (일반적으로 .csv)의 MIME 유형 표현입니다.
HTML
Enum
HTML 텍스트 파일 (일반적으로 .html)의 MIME 유형 표현입니다.
JAVASCRIPT
Enum
JavaScript 텍스트 파일 (일반적으로 .js)의 MIME 유형 표현입니다.
PLAIN_TEXT
Enum
일반 텍스트 파일 (일반적으로 .txt)의 MIME 유형 표현입니다.
RTF
Enum
리치 텍스트 파일 (일반적으로 .rtf)의 MIME 유형 표현입니다.
OPENDOCUMENT_GRAPHICS
Enum
OpenDocument 그래픽 파일 (일반적으로 .odg)의 MIME 유형 표현입니다.
OPENDOCUMENT_PRESENTATION
Enum
OpenDocument 프레젠테이션 파일 (일반적으로 .odp)의 MIME 유형 표현입니다.
OPENDOCUMENT_SPREADSHEET
Enum
OpenDocument 스프레드시트 파일 (일반적으로 .ods)의 MIME 유형 표현입니다.
OPENDOCUMENT_TEXT
Enum
OpenDocument 워드 프로세서 파일 (일반적으로 .odt)의 MIME 유형 표현입니다.
MICROSOFT_EXCEL
Enum
Microsoft Excel 스프레드시트 파일 (일반적으로 .xlsx)의 MIME 유형 표현입니다.
MICROSOFT_EXCEL_LEGACY
Enum
Microsoft Excel 기존 파일 (일반적으로 .xls)의 MIME 유형 표현입니다.
MICROSOFT_POWERPOINT
Enum
Microsoft PowerPoint 프레젠테이션 파일 (일반적으로 .pptx)의 MIME 유형 표현입니다.
MICROSOFT_POWERPOINT_LEGACY
Enum
Microsoft PowerPoint 기존 파일 (일반적으로 .ppt)의 MIME 유형 표현입니다.
MICROSOFT_WORD
Enum
Microsoft Word 문서 파일 (일반적으로 .docx)의 MIME 유형 표현입니다.
[[["이해하기 쉬움","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-26(UTC)"],[[["\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). |"]]