From 74ca750ee08ac9c6f8fbc1761f003aec3281cb22 Mon Sep 17 00:00:00 2001 From: kevin olson Date: Thu, 12 Oct 2023 14:12:29 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20more=20image=20type=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aws/aws.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aws/aws.go b/aws/aws.go index ce4be61..2e4dde2 100644 --- a/aws/aws.go +++ b/aws/aws.go @@ -126,10 +126,18 @@ func getExtension(bytes []byte) (string, string, error) { contentType := http.DetectContentType(bytes) switch contentType { + case "image/jpg": + extension = "jpg" case "image/jpeg": extension = "jpg" case "image/png": extension = "png" + case "image/gif": + extension = "gif" + case "image/webp": + extension = "webp" + case "image/svg": + extension = "webp" default: return "", "", errors.New("unable to detect Content Type: " + contentType) }