Method PickerBuilder.setSelectableMimeTypes
Stay organized with collections
Save and categorize content based on your preferences.
Set the list of MIME types which will be selectable. Use commas to separate
MIME types if more than one is required. If you don't set MIME types, files of
all MIME types are displayed in the view.
Examples
Basic usage with multiple MIME types
const mimeTypes = ['image/png', 'image/jpeg'];
const builder = new google.pickerPickerBuilder()
.setSelectableMimeTypes(mimeTypes.join(','));
Google Workspace MIME types
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(','));
Signature
setSelectableMimeTypes(type: string): PickerBuilder;
Details
Optional |
No |
Final |
No |
Protected |
No |
Static |
No |
Parameters
Name |
Type |
Optional |
Description |
type |
string |
No |
|
Returns
PickerBuilder
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-20 UTC.
[null,null,["Last updated 2025-06-20 UTC."],[],[],null,["# Method PickerBuilder.setSelectableMimeTypes\n\nSet the list of MIME types which will be selectable. Use commas to separate\nMIME types if more than one is required. If you don't set MIME types, files of\nall MIME types are displayed in the view.\n\nExamples\n--------\n\nBasic usage with multiple MIME types \n\n const mimeTypes = ['image/png', 'image/jpeg'];\n const builder = new google.pickerPickerBuilder()\n .setSelectableMimeTypes(mimeTypes.join(','));\n\nGoogle Workspace MIME types \n\n const mimeTypes = [\n 'application/vnd.google-apps.document',\n 'application/vnd.google-apps.presentation',\n 'application/vnd.google-apps.spreadsheet',\n ];\n\n const builder = new google.pickerPickerBuilder()\n .setSelectableMimeTypes(mimeTypes.join(','));\n\nSignature\n---------\n\n setSelectableMimeTypes(type: string): PickerBuilder;\n\nDetails\n-------\n\n| Optional | No |\n| Final | No |\n| Protected | No |\n| Static | No |\n|-----------|----|\n\nParameters\n----------\n\n| Name | Type | Optional | Description |\n|--------|----------|----------|-------------|\n| `type` | `string` | No | |\n\nReturns\n-------\n\n[PickerBuilder](./picker.pickerbuilder)"]]