From 7a4f21d518498809aa06d465dc8729eeacd91406 Mon Sep 17 00:00:00 2001 From: kevin olson Date: Tue, 13 Aug 2024 17:51:38 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=B1=20add=20more=20extensions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aws/aws.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/aws/aws.go b/aws/aws.go index 5c62213..551d8e1 100644 --- a/aws/aws.go +++ b/aws/aws.go @@ -138,6 +138,16 @@ func getExtension(bytes []byte) (string, string, error) { extension = "webp" case "image/svg": extension = "svg" + case "application/vnd.ms-excel": + extension = "xls" + case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": + extension = "xlsx" + case "text/comma-separated-values": + extension = "csv" + case "text/csv": + extension = "csv" + case "application/csv": + extension = "csv" default: return "", "", errors.New("unable to detect Content Type: " + contentType) }