From b9de69bcf54d0921e46cbea3534d6d69c8d19d18 Mon Sep 17 00:00:00 2001 From: Chad Date: Fri, 20 Sep 2024 19:30:48 -0700 Subject: [PATCH] Add MIME Types (#27) * Add MIME type for zip files. * Create separate case for text bucket, default to application and the extension. --- main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 7e3f8c3..1a1bae2 100755 --- a/main.js +++ b/main.js @@ -214,9 +214,15 @@ async function main() { case "html": mime = "text/html"; break; - default: + case "zip": + mime = "application/zip"; + break; + case "txt" || "csv" || "md": mime = "text/*"; break; + default: + mime = "application/" + extension; + break; } // Return the file