Feat: thumb for shared folder

This commit is contained in:
HFO4
2020-02-01 10:34:23 +08:00
parent 9fe451ad4b
commit 437bdf46d4
4 changed files with 81 additions and 0 deletions

View File

@@ -214,6 +214,12 @@ func InitMasterRouter() *gin.Engine {
middleware.CheckShareUnlocked(),
controllers.PreviewShareReadme,
)
// 获取缩略图
share.GET("thumb/:id/:file",
middleware.CheckShareUnlocked(),
middleware.ShareCanPreview(),
controllers.ShareThumb,
)
}
// 需要登录保护的