メソッド 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 |
省略可能 |
説明 |
type |
string |
いいえ |
|
戻り値
PickerBuilder
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は 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"]]