mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: group options in database scheme
This commit is contained in:
@@ -17,6 +17,20 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func ArchiveAndDownload(c *gin.Context) {
|
||||
// 创建上下文
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
var service explorer.ItemService
|
||||
if err := c.ShouldBindJSON(&service); err == nil {
|
||||
res := service.ArchiveAndDownload(ctx, c)
|
||||
c.JSON(200, res)
|
||||
} else {
|
||||
c.JSON(200, ErrorResponse(err))
|
||||
}
|
||||
}
|
||||
|
||||
// AnonymousGetContent 匿名获取文件资源
|
||||
func AnonymousGetContent(c *gin.Context) {
|
||||
// 创建上下文
|
||||
|
||||
Reference in New Issue
Block a user