Feat: download temporary archive file

This commit is contained in:
HFO4 committed 2019-12-13 15:10:44 +08:00
1 parent afc0b647ca
commit 02c93be3bc
6 files changed
+103 -15

No files matched your search

+2 -1
View File
@@ -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()