mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-04 11:22:17 +08:00
merge
This commit is contained in:
parent
695d30ac74
commit
8ef3413ec9
@ -19,7 +19,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/OpenIMSDK/protocol/constant"
|
"github.com/OpenIMSDK/protocol/constant"
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/common/prom_metrics"
|
"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/redis/go-redis/v9"
|
"github.com/redis/go-redis/v9"
|
||||||
|
|||||||
@ -175,7 +175,6 @@ func (c *Controller) CompleteUpload(ctx context.Context, uploadID string, partHa
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if md5Sum := md5.Sum([]byte(strings.Join(partHashs, partSeparator))); hex.EncodeToString(md5Sum[:]) != upload.Hash {
|
if md5Sum := md5.Sum([]byte(strings.Join(partHashs, partSeparator))); hex.EncodeToString(md5Sum[:]) != upload.Hash {
|
||||||
fmt.Println("CompleteUpload sum:", hex.EncodeToString(md5Sum[:]), "upload hash:", upload.Hash)
|
|
||||||
return nil, errors.New("md5 mismatching")
|
return nil, errors.New("md5 mismatching")
|
||||||
}
|
}
|
||||||
if info, err := c.StatObject(ctx, c.HashPath(upload.Hash)); err == nil {
|
if info, err := c.StatObject(ctx, c.HashPath(upload.Hash)); err == nil {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user