Gists
This is a sample script of Node.js for downloading the data and uploading the data to Google Drive with the resumable upload without saving it as a file. The downloaded data is uploaded to Google Drive with the stream.
Sample script Before you use this, please set the variables of accessToken, url, fileSize, mimeType and filename. In this case, fileSize is required to set because the data is uploaded with the resumable upload.
Gists
This is a sample script for downloading the active sheet in Google Spreadsheet to the local PC as a CSV file and a PDF file when a button on the side bar and the dialog is clicked. This is created with Google Apps Script and HTML&Javascript. In this post, the script of the previous post was modified.
Sample script Please create new Google Spreadsheet and copy and paste the following scripts to the script editor.
Gists
This is a sample script for downloading Google Spreadsheet to the local PC as a XLSX file and a PDF file when a button on the side bar and the dialog is clicked. This is created with Google Apps Script and HTML&Javascript.
Sample script Please create new Google Spreadsheet and copy and paste the following scripts to the script editor. And please run openSidebar(). By this, the side bar is opened to the Spreadsheet.
v1.0.3 (August 1, 2020)
When the file size less than the default chunk is downloaded, an error occurred. This bug was removed. You can see the detail information here https://github.com/tanaikech/DownloadLargeFilesByUrl
Overview This is a sample script for downloading files from Google Drive by the one time download method.
Description When you download a file from Google Drive, in generally, the login and the access token are required. If you want to download the file without the authorization for the simple situation, the file is required to be publicly shared. But the file might not be able to be shared publicly, because of various reasons.
v1.0.1 (December 5, 2018)
When the filename have not been retrieved, an error have occurred. This bug was removed. You can see the detail information here https://github.com/tanaikech/DownloadLargeFilesByUrl
Overview DownloadLargeFilesByUrl is a GAS library for downloading large files from URL to Google Drive using Google Apps Script (GAS).
Description I had been thinking of about whether a large file from an URL can be downloaded to Google Drive using GAS. When I have tried to download such large files, I noticed the following limitations. These limitations are due to the specification of GAS.
When users download a file from URL using GAS, at the most users, it retrieves the blob using UrlFetchApp.
Gists
This is a sample script for downloading a file using a button of dialog box on Google Docs (Spreadsheet, Document and Slides).
Please use this sample script at script editor on Google Docs (Spreadsheet, Document and Slides). And please set file ID in the script.
FLow : The flow of this sample script is as follows.
Run dialog(). Open a dialog. When users click a download button, retrieve file ID at GAS side.
Gists
This sample script is for downloading files under a specific folder using Node.js. It can download files with Google Docs and others.
This sample supposes as follows. So please confirm it.
quickstart is used and default quickstart works fine. In order to use this sample, please carry out as follows.
Replace listFiles() of the default quickstart to this sample. Set folderid. This script can retrieve files in the folder with folderid.
Gists
When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.
File size < 40MB CURL filename="### filename ###" fileid="### file ID ###" curl -L -o ${filename} "https://drive.google.com/uc?export=download&id=${fileid}" File size > 40MB When it tries to download the file with more than 40MB, Google says to download from following URL.
Gist
This is a sample script for downloading files from Google Drive under no authorization using browser. By using this sample, you can make other users download files from your Google Drive. Even if the other users are not Google users, they can download the files.
Demo This is a demonstration for downloading files from Google Drive under no authorization using browser. From the top document, You can see that an user who is not owner of Google Drive is downloading files.