Gists
This is a sample script for the resumable upload using Axios with Node.js.
Sample script In this sample script, as a sample situation in order to explain the resumable upload, the file data is loaded from the local PC, and the data is uploaded to Google Drive with the resumable upload.
const axios = require("axios"); const fs = require("fs").promises; async function sample() { const filepath = "./###"; // Please set the filename and file path of the upload file.
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.
Gists
This is a sample script for uploading the image files to the specific album in Google Photos using axios.
Before you use this script, please retrieve the access token for uploading the files using Google Photos API.
Sample script In this sample script, several image files can be uploaded.
<input type="file" id="files" name="file" multiple /> <input type="button" onclick="main()" value="upload" /> <script> function upload({ files, albumId, accessToken }) { const description = new Date().