Serve images folder in router
This commit is contained in:
parent
ab7cc7d1e0
commit
acc8c4d35f
|
|
@ -36,6 +36,7 @@ func Create(db *database.GormDatabase, vInfo *model.VersionInfo, conf *config.Co
|
||||||
ui.Register(g)
|
ui.Register(g)
|
||||||
|
|
||||||
g.GET("/swagger", docs.Serve)
|
g.GET("/swagger", docs.Serve)
|
||||||
|
g.Static("/image", conf.UploadedImagesDir)
|
||||||
g.GET("/docs/*any", gin.WrapH(http.StripPrefix("/docs/", http.FileServer(swaggerui.GetBox()))))
|
g.GET("/docs/*any", gin.WrapH(http.StripPrefix("/docs/", http.FileServer(swaggerui.GetBox()))))
|
||||||
|
|
||||||
g.Use(func(ctx *gin.Context) {
|
g.Use(func(ctx *gin.Context) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue