Serve images folder in router

This commit is contained in:
Jannis Mattheis 2018-03-30 19:29:49 +02:00 committed by Jannis Mattheis
parent ab7cc7d1e0
commit acc8c4d35f
1 changed files with 1 additions and 0 deletions

View File

@ -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) {