File size: 338 Bytes
3d979b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * Google Drive client
 */
class Drive {
  /**
   * Save image to Google Drive
   * @param {Blob} image Image blob
   * @return {string} File ID of the saved image
   */
  static saveImage(image) {
    var folder = DriveApp.getFolderById(CONFIG.DRIVE_FOLDER_ID);
    var file = folder.createFile(image);
    return file.getId();
  }
}