fix version 1

This commit is contained in:
2026-09-22 21:15:34 +08:00
parent 9f86366638
commit d63d7e8b3a
277 changed files with 9959 additions and 1514 deletions

View File

@@ -52,6 +52,12 @@ func UploadFile(ctx context.Context, in *pb.CloudDiskFileRequest) (reply *pb.Sta
return nil, errcode.ErrAlreadyExists
}
// 校验容量配额,「已用 + 本次」不得超过上限
if err := checkQuota(auth.ID, in.Size); err != nil {
printer.Error("Check quota error: %v", err)
return nil, err
}
// 生成文件哈希(如果未提供)
fileHash := in.Hash
if fileHash == "" {