mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 17:41:57 +08:00
Feat: download temporary archive file
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/HFO4/cloudreve/pkg/util"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/url"
|
||||
"time"
|
||||
)
|
||||
|
||||
// ItemMoveService 处理多文件/目录移动
|
||||
@@ -61,7 +62,7 @@ func (service *ItemService) Archive(ctx context.Context, c *gin.Context) seriali
|
||||
zipID := util.RandStringRunes(16)
|
||||
signedURI, err := auth.SignURI(
|
||||
fmt.Sprintf("/api/v3/file/archive/%s", zipID),
|
||||
120,
|
||||
time.Now().Unix()+120,
|
||||
)
|
||||
finalURL := siteURL.ResolveReference(signedURI).String()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user