Skip to content

Commit

Permalink
[UPDATE] README doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas-ggd committed Dec 15, 2024
1 parent b8fa178 commit 63b97e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 63b97e4

Please sign in to comment.