google-drive-api

Unable to download file via Google Drive API

…衆ロ難τιáo~ 提交于 2021-01-27 14:12:44
问题 Node.js v10.15.2, googleapis v40.0.0 I tried this const dest = fs.createWriteStream(`/Users/user/Downloads/${fileId}.mp4`); drive.files.get({ fileId, alt: 'media' }, { responseType: 'stream' }, (err, res) => { res.data.on('end', () => { console.log('Done downloading file!'); }) .on('error', console.error) .pipe(dest); }); And got error $ node . Files: 20140810_125633.mp4 (1SwYm5Z1zPczZnDulmsbA9wrEJ-JT-hwE) Getting started (0B3K2QXOGSOFRc3RhcnRlcl9maWxl) (node:62335)

How can I force all files in a folder to be owned by the folder owner in Google Drive?

自古美人都是妖i 提交于 2021-01-27 13:11:54
问题 I have several people contributing files to various folders in Google Drive. Each folder is for a specific project, and has an owner account named to match that project title. I want every file (and its descendants) in that parent folder to be owned by that project account. Eg the folder is called "Conferences", and is owned by the user "conferences.events@mydomain.com". All files uploaded/created into Conferences should be owned by the "conferences.events" account. What is the easiest way to

The API developer key is invalid when viewing file in google picker

主宰稳场 提交于 2021-01-27 03:57:22
问题 I want to view all files in google picker for that i am following this link: https://developers.google.com/picker/docs/ but it returns The API developer key is invalid. My code is as follows but that key is working properly in other projects: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Google Picker Example</title> <script type="text/javascript"> // The Browser API key obtained from the Google

How to download a big file from google drive via curl in Bash?

隐身守侯 提交于 2021-01-24 01:28:38
问题 I wanna make a very simple bash script for downloading files from google drive via Drive API , so in this case there is a big file on google drive and I installed OAuth 2.0 Playground on my google drive account, then in the Select the Scope box, I choose Drive API v3 , and https://www.googleapis.com/auth/drive.readonly to make a token and link. After clicking Authorize APIs and then Exchange authorization code for tokens . I copied the Access token like below. #! /bin/bash read -p 'Enter your

How to download a big file from google drive via curl in Bash?

烈酒焚心 提交于 2021-01-24 01:27:16
问题 I wanna make a very simple bash script for downloading files from google drive via Drive API , so in this case there is a big file on google drive and I installed OAuth 2.0 Playground on my google drive account, then in the Select the Scope box, I choose Drive API v3 , and https://www.googleapis.com/auth/drive.readonly to make a token and link. After clicking Authorize APIs and then Exchange authorization code for tokens . I copied the Access token like below. #! /bin/bash read -p 'Enter your

How to download a big file from google drive via curl in Bash?

六月ゝ 毕业季﹏ 提交于 2021-01-24 01:25:00
问题 I wanna make a very simple bash script for downloading files from google drive via Drive API , so in this case there is a big file on google drive and I installed OAuth 2.0 Playground on my google drive account, then in the Select the Scope box, I choose Drive API v3 , and https://www.googleapis.com/auth/drive.readonly to make a token and link. After clicking Authorize APIs and then Exchange authorization code for tokens . I copied the Access token like below. #! /bin/bash read -p 'Enter your

How to download a big file from google drive via curl in Bash?

为君一笑 提交于 2021-01-24 01:24:29
问题 I wanna make a very simple bash script for downloading files from google drive via Drive API , so in this case there is a big file on google drive and I installed OAuth 2.0 Playground on my google drive account, then in the Select the Scope box, I choose Drive API v3 , and https://www.googleapis.com/auth/drive.readonly to make a token and link. After clicking Authorize APIs and then Exchange authorization code for tokens . I copied the Access token like below. #! /bin/bash read -p 'Enter your

Google Colab API

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-20 18:59:33
问题 Is there a Google Colab API? I'm looking to accomplish things like: Create users Create notebooks Share notebooks with users Retrieve the contents of a notebook 回答1: As pointed out in the other answer, Colab Notebooks are files on your Google Drive. Hence, sharing them or retrieving their contents can be done via the Google Drive API (from what I understand you can use the webContentLink to download it). However, your first question is: Where is the Google Colab API? For anyone coming here

Base64 string img not viewable when uploaded via drive api

烂漫一生 提交于 2021-01-20 09:14:31
问题 I have uploaded a base64 img string to Google Drive via API in node express. After uploading the img, it is not viewable in Drive. I'm not sure on how to resolve this formatting issue. I know I could potentially save the img locally first, then upload the saved img file but I was hoping there is a simpler way. My code: const uploadImg = async (folderId,img)=>{ process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0 const scopes = [ 'https://www.googleapis.com/auth/drive' ]; const auth = new google

Base64 string img not viewable when uploaded via drive api

夙愿已清 提交于 2021-01-20 09:12:52
问题 I have uploaded a base64 img string to Google Drive via API in node express. After uploading the img, it is not viewable in Drive. I'm not sure on how to resolve this formatting issue. I know I could potentially save the img locally first, then upload the saved img file but I was hoping there is a simpler way. My code: const uploadImg = async (folderId,img)=>{ process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0 const scopes = [ 'https://www.googleapis.com/auth/drive' ]; const auth = new google