mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-28 10:51:57 +08:00
Fix: panics inside of task was not correctly logged into DB
Feat: slave node use new API to upload file to master
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/cloudreve/Cloudreve/v3/pkg/auth"
|
||||
"github.com/cloudreve/Cloudreve/v3/pkg/cache"
|
||||
"github.com/cloudreve/Cloudreve/v3/pkg/filesystem"
|
||||
"github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/local"
|
||||
"github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx"
|
||||
"github.com/cloudreve/Cloudreve/v3/pkg/hashid"
|
||||
"github.com/cloudreve/Cloudreve/v3/pkg/serializer"
|
||||
@@ -137,6 +138,8 @@ func (service *UploadService) SlaveUpload(ctx context.Context, c *gin.Context) s
|
||||
return serializer.Err(serializer.CodePolicyNotAllowed, err.Error(), err)
|
||||
}
|
||||
|
||||
fs.Handler = local.Driver{}
|
||||
|
||||
// 解析需要的参数
|
||||
service.Index, _ = strconv.Atoi(c.Query("chunk"))
|
||||
mode := fsctx.Append
|
||||
|
||||
Reference in New Issue
Block a user