From 4f01068ea1acaf3f3e27bd76e4b8e5e0f5d8f278 Mon Sep 17 00:00:00 2001 From: n0vad3v Date: Thu, 21 Mar 2024 23:06:37 +0800 Subject: [PATCH] Add GIF to AllowedTypes --- config.json | 2 +- config/config.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.json b/config.json index 98eeca729..bb3e051b5 100644 --- a/config.json +++ b/config.json @@ -5,7 +5,7 @@ "IMG_PATH": "./pics", "EXHAUST_PATH": "./exhaust", "IMG_MAP": {}, - "ALLOWED_TYPES": ["jpg","png","jpeg","bmp","svg","heic","nef"], + "ALLOWED_TYPES": ["jpg","png","jpeg","gif","bmp","svg","heic","nef"], "CONVERT_TYPES": ["webp"], "STRIP_METADATA": true, "ENABLE_EXTRA_PARAMS": false, diff --git a/config/config.go b/config/config.go index 2cf20f8ed..3217f96f6 100644 --- a/config/config.go +++ b/config/config.go @@ -29,7 +29,7 @@ const ( "IMG_PATH": "./pics", "EXHAUST_PATH": "./exhaust", "IMG_MAP": {}, - "ALLOWED_TYPES": ["jpg","png","jpeg","bmp","svg","heic","nef"], + "ALLOWED_TYPES": ["jpg","png","jpeg","gif","bmp","svg","heic","nef"], "CONVERT_TYPES": ["webp"], "STRIP_METADATA": true, "ENABLE_EXTRA_PARAMS": false, @@ -92,7 +92,7 @@ func NewWebPConfig() *WebpConfig { Port: "3333", ImgPath: "./pics", Quality: 80, - AllowedTypes: []string{"jpg", "png", "jpeg", "bmp", "svg", "nef", "heic", "webp"}, + AllowedTypes: []string{"jpg", "png", "jpeg", "bmp", "gif", "svg", "nef", "heic", "webp"}, ConvertTypes: []string{"webp"}, ImageMap: map[string]string{}, ExhaustPath: "./exhaust",