router.Static("/public", "upload")

I want users to be able to access files only when they exist

example:

/public/aaa/1.png

not show the dir when: /public/aaa

Comment From: JoiLa

Hi Guy ,You Can Try this

router.StaticFS("/", gin.Dir("public", false))