Feat: download temporary archive file

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

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()