feat: file serving

This commit is contained in:
grngxd 2025-05-05 15:22:18 +01:00
parent 3cb5682f62
commit b00e82e0e6
2 changed files with 7 additions and 0 deletions

BIN
imgs/a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 KiB

View file

@ -21,4 +21,11 @@ func RegisterUploadRoutes(cfg *types.StereoConfig, api *gin.RouterGroup) {
return return
} }
}) })
api.GET("/:name", func(c *gin.Context) {
name := c.Param("name")
path := filepath.Join(cfg.ImagePath, name)
c.File(path)
})
} }