From 63b97e4e914d6385f3cf768b7e857011c265471e Mon Sep 17 00:00:00 2001 From: Nicolas-ggd Date: Sun, 15 Dec 2024 18:04:19 +0400 Subject: [PATCH] [UPDATE] README doc --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bd21d6f..9813337 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,11 @@ func Upload(c *gin.Context) { var allowExtensions = []string{".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp"} // This function is very simple, but save your time to compare extension and current file to known if it's valid for you - fstream.IsAllowExtension(allowExtensions, "filename.png") + allowed := fstream.IsAllowExtension(allowExtensions, "filename.png") + + if allowed { + // your logic goes here... + } ``` ## License