메서드 PickerBuilder.setSelectableMimeTypes
선택할 수 있는 MIME 유형 목록을 설정합니다. 쉼표를 사용하여 구분
둘 이상이 필요한 경우 MIME 유형입니다. MIME 유형을 설정하지 않으면 모든 MIME 유형의 파일이 뷰에 표시됩니다.
예
여러 MIME 유형을 사용한 기본 사용
const mimeTypes = ['image/png', 'image/jpeg'];
const builder = new google.pickerPickerBuilder()
.setSelectableMimeTypes(mimeTypes.join(','));
Google Workspace MIME 유형
const mimeTypes = [
'application/vnd.google-apps.document',
'application/vnd.google-apps.presentation',
'application/vnd.google-apps.spreadsheet',
];
const builder = new google.pickerPickerBuilder()
.setSelectableMimeTypes(mimeTypes.join(','));
서명
setSelectableMimeTypes(type: string): PickerBuilder;
세부정보
선택사항 |
아니요 |
종료 |
아니요 |
보호됨 |
아니요 |
정적 |
아니요 |
매개변수
이름 |
유형 |
선택사항 |
설명 |
type |
string |
아니요 |
|
반환 값
PickerBuilder
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-10-15(UTC)
[null,null,["최종 업데이트: 2024-10-15(UTC)"],[[["Defines the accepted file types for display in the Google Picker view."],["Uses a comma-separated string of MIME types to specify allowed file formats."],["If no MIME types are set, all file types will be visible."],["Provides examples for basic usage and Google Workspace specific MIME types."],["Returns a PickerBuilder object for chaining further configurations."]]],["The `setSelectableMimeTypes` method, part of `PickerBuilder`, filters selectable file types. It takes a comma-separated string of MIME types as input. If no MIME types are specified, all file types are selectable. Examples show usage with image types and Google Workspace types. This method, which is not optional, final, protected or static, returns a `PickerBuilder` object, and it is necessary to input a string value.\n"]]