Method PickerBuilder.setSelectableMimeTypes
מגדירים את רשימת סוגי ה-MIME שאפשר יהיה לבחור. יש להשתמש בפסיקים כדי להפריד
סוגי MIME, אם נדרש יותר ממסמך אחד. אם לא מגדירים סוגי MIME, קבצים של
כל סוגי ה-MIME מוצגים בתצוגה.
דוגמאות
שימוש בסיסי עם כמה סוגי MIME
const mimeTypes = ['image/png', 'image/jpeg'];
const builder = new google.pickerPickerBuilder()
.setSelectableMimeTypes(mimeTypes.join(','));
סוגי ה-MIME ב-Google Workspace
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. 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"]]