I am trying to integrate a Google File Picker where users can click a button from my site and then open the Google File Picker modal that allows them to choose videos only from their Google Drive. This section of the site is for recording videos and allows users the option to upload a video from google drives.
I tried searching everywhere to see if someone has done something similar but could not find any help sources (I'm a junior so maybe I missed some places). I built something similar to this but for uploading other files that did not include videos.
This is my code for my Google File Picker that uploads other various mimeTypes/files. I thought I could add "application/vnd.google-apps.video" at the bottom of the list but it didn't work.
if (pickerApiLoaded && oauthToken) {
var view = new google.picker.DocsView(google.picker.ViewId.DOCS);
var filterMimeTypes = [
"application/pdf",
"application/vnd.google-apps.document",
"application/vnd.google-apps.presentation",
"application/vnd.google-apps.spreadsheet",
"application/msword",
"application/vnd.ms-excel",
"application/vnd.ms-powerpoint",
"application/vnd.openxmlformats*"
];
view.setMimeTypes(filterMimeTypes.join());
var picker = new google.picker.PickerBuilder()
.addView(view)
.setOAuthToken(oauthToken)
.setDeveloperKey(developerKey)
.setCallback(pickerCallback)
.build();
picker.setVisible(true);
}
}
Has anyone does this before or has some guidance?