google-picker

What is the right way to put a Drive image into a Sheets cell programmatically?

岁酱吖の 提交于 2019-12-17 18:27:52
问题 I have a WebApp that collects work site data into a Google Sheets spreadsheet and also collects work site photos into a Google Drive folder that I create for each job. Some, but not all, of the photos must be viewable in a cell in Google Sheets, such that the sheet can be printed as part of a job completion report. I use Google Picker to upload files to the folder specific to the work site job. I am unsure of the best way to use them from there. I have had success setting a cell formula such

window.location picks IP address and not the domain name

寵の児 提交于 2019-12-13 03:44:50
问题 I've my ruby on rails website registered as a subdomain under godaddy.com It works fine. But when I try to get the window.location.host, It returns the IP address of my server and not the domain name. Because of this I'm getting the following error with my google picker js api: Incorrect origin value. Please set it to - (window.location.protocol + '//' + window.location.host) of the top-most page Can anyone help ? 回答1: This is because the domain might be set in domain forwarding mode. The

Google Drive Picker - select folders to upload

依然范特西╮ 提交于 2019-12-12 05:47:46
问题 I have my picker code as follows: var mimetypes = "application/vnd.ms-excel," + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet," + "application/vnd.google-apps.spreadsheet," + "application/vnd.ms-powerpoint," + "application/vnd.openxmlformats-officedocument.presentationml.presentation," + "application/vnd.google-apps.presentation," + "application/vnd.openxmlformats-officedocument.wordprocessingml.document," + "application/msword," + "application/vnd.google-apps.document,"

Unable to export a google slide as pdf format on server side

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 04:54:10
问题 Here is my code for testing exporting files from google drive on server side. import logging from flask import Flask, render_template, request from googleapiclient.discovery import build from googleapiclient.http import MediaIoBaseDownload from oauth2client.client import AccessTokenCredentials import httplib2 import io app = Flask(__name__) @app.route('/gdrive/selectcallback') def userselectioncallback(): print "In user selection callback... " code = request.args.get('user_token') fileId =

files downloaded from google drive usin picker are corrupted

不羁岁月 提交于 2019-12-11 08:32:40
问题 I'm using google picker in my web app to allow user to browse and select files from his google drive. Once he makes the selection, picker returns various data about selected files, including file ID and URL. My goal is to download the selected files to the server. If I pass the URL to my backend script, it download file but they are corrupted here is my code : callback function : function onPickerAction(data) { if (data.action === google.picker.Action.PICKED) { var id = data.docs[0].id; var

Google Drive close automatically after authentication

情到浓时终转凉″ 提交于 2019-12-11 05:38:37
问题 I am working on Google Drive picker in my web application. Everything works fine but when it opens an Authentication window and I approved it, the window automatically close without showing or allowing file selection. Here is my JavaScript code: // The Browser API key obtained from the Google API Console. var developerKey = '*****************************'; // The Client ID obtained from the Google API Console. Replace with your own Client ID. var clientId = '*********

How can I use the drive.file oauth2 scope with a folder in Google Drive? [duplicate]

这一生的挚爱 提交于 2019-12-11 04:29:16
问题 This question already has an answer here : Does Google Drive's 'per file' scope cascade into child folders/files? (1 answer) Closed last year . I'm working on a web app that will work with users' folders in Google Drive rather than individual files. I'd like to request the minimum permissions needed by using the drive.file scope. I'm using the Drive picker UI to allow the user to select a folder, which works nicely with the drive.file and adds the folder to the list of folders my app can

Download file right after picked file from google picker

丶灬走出姿态 提交于 2019-12-07 18:56:58
问题 I am just trying to implement the Google Drive Picker API in order to download file (on background) submit by a user via Google drive picker. I did the Google picker and it worked fine but then, I just couldn't download the file. (begin with single file first). This is my code, in my dream I could download the file right after getting the picker's file. function createPicker() { if (pickerApiLoaded && oauthToken) { var picker = new google.picker.PickerBuilder(). addView(google.picker.ViewId

Downloading file from Google Drive by using Google Picker

巧了我就是萌 提交于 2019-12-06 05:59:13
问题 I'm trying to build a webpage on which user can select an image from Google Drive by using Google Picker and download selected files to my server by using PHP script. I have managed to setup the Picker, and i get fileIDs but when i pass this IDs to my backend and try GET method i get an authentication error. I have spent 2 days working on this and researching, but more I read google official documentation the more confused I am. Can someone tell me, or link me the example how implement this?

Download file right after picked file from google picker

☆樱花仙子☆ 提交于 2019-12-06 04:36:04
I am just trying to implement the Google Drive Picker API in order to download file (on background) submit by a user via Google drive picker. I did the Google picker and it worked fine but then, I just couldn't download the file. (begin with single file first). This is my code, in my dream I could download the file right after getting the picker's file. function createPicker() { if (pickerApiLoaded && oauthToken) { var picker = new google.picker.PickerBuilder(). addView(google.picker.ViewId.DOCS). addView(google.picker.ViewId.PHOTOS). addView(google.picker.ViewId.FOLDERS). enableFeature(google