google-picker

Google Drive Picker: Show only top level folders

旧时模样 提交于 2020-12-07 04:38:11
问题 Currently I am using google.picker.​ViewId.FOLDERS view in Google drive picker. This however, shows all the folders(including deep level folders) in my drive. How to achieve a view in which only the top level folders are displayed at first? This would be similar to Dropbox chooser's file view. 回答1: In order to see the folders and files at root level, you can use the view: addView(new google.picker.DocsView().setIncludeFolders(true).setOwnedByMe(true)) You will be able to search for items in

Google Drive Picker: Show only top level folders

邮差的信 提交于 2020-12-07 04:37:41
问题 Currently I am using google.picker.​ViewId.FOLDERS view in Google drive picker. This however, shows all the folders(including deep level folders) in my drive. How to achieve a view in which only the top level folders are displayed at first? This would be similar to Dropbox chooser's file view. 回答1: In order to see the folders and files at root level, you can use the view: addView(new google.picker.DocsView().setIncludeFolders(true).setOwnedByMe(true)) You will be able to search for items in

Google Drive API Picker v3 (May 2018) window disappears and gives .split is not a function error

ε祈祈猫儿з 提交于 2020-07-19 03:36:05
问题 Using Google Drive API Picker v3, Chrome Version 66.0.3359.139 Each account can log into their account one time and one time only. You can switch back and forth between accounts, but if you try to access the same account 2 times in a row... it will fail with the .split is not a function. There seems to be an error when the oauthToken attempts to be parsed back on the client side. Why is the auth not updating? Is there a setting or something I am missing? Chrome stack trace: 3723580519

Google Drive API Picker v3 (May 2018) window disappears and gives .split is not a function error

谁说我不能喝 提交于 2020-07-19 03:34:52
问题 Using Google Drive API Picker v3, Chrome Version 66.0.3359.139 Each account can log into their account one time and one time only. You can switch back and forth between accounts, but if you try to access the same account 2 times in a row... it will fail with the .split is not a function. There seems to be an error when the oauthToken attempts to be parsed back on the client side. Why is the auth not updating? Is there a setting or something I am missing? Chrome stack trace: 3723580519

How to show/hide loading spinner in addon sidebar while Google Picker dialog is opened/closed?

北城余情 提交于 2020-01-06 06:59:55
问题 I followed this tutorial: https://developers.google.com/apps-script/guides/dialogs#file-open_dialogs and I can open a Google Picker after clicking a button inside my addon sidebar. I want to do 2 things for better UX for my users: The first thing is when the Google Picker is open, I want to show a loading spinner inside my addon sidebar (to prevent users from interacting with the sidebar), so that users can only interact with the Google Picker until it's closed After users choose a document

How to process raw jpeg data into a file in javascript

ⅰ亾dé卋堺 提交于 2019-12-25 01:32:42
问题 I'm trying to create a jpeg file from raw data in javascript I've been using the google file picker api to allow users to select their images from drive and import into my application, but when I make the request to download the image google responds with raw data that looks like this: Google's response I have tried placing that data into a blob with: var blob = new Blob([res.text], {type: 'image/jpeg'}) I have also tried placing the data into a file. var file = new File([res.text], 'image

Use Google Picker without logging in with Google account (with OAuth)

送分小仙女□ 提交于 2019-12-21 19:10:49
问题 Is it possible to present the Google Picker to a user who isn't logged in with her Google account? I would like to let the user select files from a shared Google Drive of the Google account of my website. I can access these files with OAuth on the server. But is it also possible to present the files with Google Picker? Maybe with this method: PickerBuilder.setOAuthToken(string) Sets an OAuth token to use for authenticating the current user. Depending on the scope of the token, only certain

Opening specific MimeTypes with google picker

别来无恙 提交于 2019-12-19 09:23:45
问题 I am working with realtime API and I am making use of realtime-client-utils. Using existing code, I am creating realtime files with this method: createRealtimeFile = function(title, callback) { gapi.client.load('drive', 'v2', function() { gapi.client.drive.files.insert({ 'resource': { mimeType: rtclient.REALTIME_MIMETYPE, title: title } }).execute(callback); }); } and then I am trying to open files with this picker: var popupOpen = function () { var token = gapi.auth.getToken().access_token;