diff --git a/config.json b/config.json index 35fc329..ec223ba 100644 --- a/config.json +++ b/config.json @@ -4,5 +4,10 @@ "QUALITY": "80", "IMG_PATH": "/path/to/pics", "EXHAUST_PATH": "", - "ALLOWED_TYPES": ["jpg","png","jpeg","bmp","gif"] + "ALLOWED_TYPES": [ + "jpg", + "png", + "jpeg", + "bmp" + ] } diff --git a/router.go b/router.go index dbfe06b..c851d2e 100644 --- a/router.go +++ b/router.go @@ -42,10 +42,8 @@ func Convert(ImgPath string, ExhaustPath string, AllowedTypes []string, QUALITY } } if !allowed { - msg := "File extension not allowed!" - log.Warnf("%s %s", msg, ImgFilename) - c.Send(msg) - c.SendStatus(403) + log.Warnf("File extension not allowed! %s", ImgFilename) + c.SendFile(RawImageAbs) return }