Note that there are some explanatory texts on larger screens.

plurals
  1. PODocsUploadView and setOAuthToken causing "undefined Dismiss" error
    primarykey
    data
    text
    <p>I'm building a webapp where a user can Authorize via OAuth2 and choose/upload files from their own Drive for later use. Essentially we're just storing the file ID and using the API to access them later. Everything is working fine when I use .setAuthUser() and require users to be logged in independent of our app, but when we use .setOAuthToken() instead only the file picker works — the DocsUploadView panel returns an "undefined" error.</p> <p>This behavior is consistent across Firefox/Chrome/Safari and with or without a current user login. It's always able to see files, never able to upload them. We are requesting full drive scope but even with that we're seeing errors.</p> <p>For now we're just using setAuthUser as a workaround but this causes extra steps and a few problems when a user isn't logged in. Is it possible to use setOAuthToken with DocsUploadView?</p> <p>The picker builder code I'm using is below, with IDs and tokens in the same format I'm using but altered for security.</p> <p>Thanks!</p> <pre><code>var view = new google.picker.View(google.picker.ViewId.DOCS); var uploadview = new google.picker.DocsUploadView(); var picker = new google.picker.PickerBuilder() .enableFeature(google.picker.Feature.MINE_ONLY) .disableFeature(google.picker.Feature.NAV_HIDDEN) .disableFeature(google.picker.Feature.MULTISELECT_ENABLED) .setAppId('987654321098') .setOAuthToken('ya31.AIER6DRhxRgRsT0SoGPoaxPMhDd0n3OHKj43SJaG5kFndZ52') .addView(uploadview) .addView(view) .setCallback(pickerCallback) .build(); picker.setVisible(true); </code></pre> <p>[cross-posted at: <a href="https://groups.google.com/d/topic/google-picker-api/p9whgDscUrQ/discussion" rel="nofollow">https://groups.google.com/d/topic/google-picker-api/p9whgDscUrQ/discussion</a>]</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload