feat: file serving
This commit is contained in:
parent
3cb5682f62
commit
b00e82e0e6
2 changed files with 7 additions and 0 deletions
|
@ -21,4 +21,11 @@ func RegisterUploadRoutes(cfg *types.StereoConfig, api *gin.RouterGroup) {
|
|||
return
|
||||
}
|
||||
})
|
||||
|
||||
api.GET("/:name", func(c *gin.Context) {
|
||||
name := c.Param("name")
|
||||
path := filepath.Join(cfg.ImagePath, name)
|
||||
|
||||
c.File(path)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue