Feat: download file from single file share

This commit is contained in:
HFO4
2020-01-28 12:41:00 +08:00
parent 0977b36f8b
commit 7f0feebf42
13 changed files with 199 additions and 8 deletions

View File

@@ -26,3 +26,14 @@ func GetShare(c *gin.Context) {
c.JSON(200, ErrorResponse(err))
}
}
// GetShareDownload 创建分享下载会话
func GetShareDownload(c *gin.Context) {
var service share.SingleFileService
if err := c.ShouldBindQuery(&service); err == nil {
res := service.CreateDownloadSession(c)
c.JSON(200, res)
} else {
c.JSON(200, ErrorResponse(err))
}
}