Skip to content

Commit e947e3f

Browse files
committed
fix(drivers/139): correct group params for new put
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
1 parent bd99844 commit e947e3f

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

drivers/139/driver.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,11 @@ func (d *Yun139) Put(ctx context.Context, dstDir model.Obj, stream model.FileStr
703703
return fmt.Errorf("cloud_id is required for group/family upload")
704704
}
705705
data["groupId"] = d.CloudID
706-
data["groupType"] = 1
706+
if d.isGroup() {
707+
data["groupType"] = 2
708+
} else if d.isFamily() {
709+
data["groupType"] = 1
710+
}
707711
data["catalogType"] = 3
708712
data["seqNo"] = random.String(32)
709713
}
@@ -773,6 +777,10 @@ func (d *Yun139) Put(ctx context.Context, dstDir model.Obj, stream model.FileStr
773777
"fileId": resp.Data.FileId,
774778
"uploadId": resp.Data.UploadId,
775779
}
780+
// 家庭盘和小组盘需要额外的参数
781+
if d.isGroup() || d.isFamily() {
782+
data["groupId"] = d.CloudID
783+
}
776784
_, err = d.newPost(completePath, data, nil)
777785
if err != nil {
778786
return err

0 commit comments

Comments
 (0)