From: Ardis Lu Date: Sun, 29 Aug 2021 07:51:38 +0000 (-0700) Subject: Update query MIME type to text/plain X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=7cd0e14af77a6e45e5257f8c8cc79d7ffa608e6c;p=sheets-db Update query MIME type to text/plain This MIME type signals to the CDN to compress the file. The default MIME type 'application/octet-stream' will not be compressed by default. --- diff --git a/Code.gs b/Code.gs index e6755bc..e640412 100644 --- a/Code.gs +++ b/Code.gs @@ -139,7 +139,7 @@ function uploadToBackblaze() { // b2_upload_file const file = DriveApp.getFileById(FILE_ID); const fileName = file.getName(); - const mimeType = file.getMimeType(); + const mimeType = 'text/plain'; // Use 'text/plain' to enable compression by CDN. file.getMimeType() gives 'application/octet-stream', which will not be compressed. const contentLength = file.getSize(); const data = file.getBlob(); const digest = Utilities.computeDigest(Utilities.DigestAlgorithm.SHA_1, data.getBytes());