tanaike

The Thinker

Simple Script of Resumable Upload with Google Drive API for Axios

Gists This is a simple sample script for achieving the resumable upload to Google Drive using Axios. In order to achieve the resumable upload, at first, it is required to retrieve the location, which is the endpoint of upload. The location is included in the response headers. After the location was retrieved, the file can be uploaded to the location URL. In this sample, a text data is uploaded with the resumable upload using a single chunk.

Downloading and Uploading File to Google Drive without Saving File with Stream and Resumable Upload using Node.js

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.

Safe-Uploading for Google Drive by HTML in External Server using Google Apps Script

Overview This is a report for safe-uploading files to Google Drive by HTML put in the external server using Google Apps Script. Description When you want to make the user upload a file to your own Google Drive using the HTML put in the external server of Google side, when the file size is smaller than 50 MB, this can be achieved without using the access token. Ref (When the HTML is put in the internal server of Google side, you can also use google.

Javascript library - BatchRequest_js

Overview This is a library for running Batch Requests for Google APIs using Javascript. Description When users use Google’s APIs, one quota is used for one API call. When the batch request is used, several APIs can be called by one quota, although there are some limitations in the batch request. google-api-javascript-client can run the batch request. Ref But, I created this for my self study. This library can achieve the batch request using fetch without using google-api-javascript-client.