From 7cd0e14af77a6e45e5257f8c8cc79d7ffa608e6c Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Sun, 29 Aug 2021 00:51:38 -0700 Subject: [PATCH] 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. --- Code.gs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); -- 2.47.3