Enum MimeType
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Mime유형
문자열을 명시적으로 입력하지 않고도 MIME 유형 선언에 액세스할 수 있는 열거형입니다. MIME 유형이 문자열로 렌더링될 것으로 예상하는 메서드 (예:
'image/png'
)는 메서드가 기본 MIME 유형을 지원하는 한 아래 값도 허용합니다.
// Use MimeType enum to log the name of every Google Doc in the user's Drive.
const docs = DriveApp.getFilesByType(MimeType.GOOGLE_DOCS);
while (docs.hasNext()) {
const doc = docs.next();
Logger.log(doc.getName());
}
// Use plain string to log the size of every PNG in the user's Drive.
const pngs = DriveApp.getFilesByType('image/png');
while (pngs.hasNext()) {
const png = 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 유형 표현입니다. |
MICROSOFT_WORD_LEGACY | Enum | Microsoft Word 기존 파일 (일반적으로 .doc)의 MIME 유형 표현입니다. |
ZIP | Enum | ZIP 보관 파일 (일반적으로 .zip)의 MIME 유형 표현입니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 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). |"]]