mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
s3 presigned test
This commit is contained in:
parent
5a9ecbf295
commit
d9c7c57343
@ -191,7 +191,7 @@ func (c *Controller) CompleteUpload(ctx context.Context, uploadID string, partHa
|
||||
md5Sum := md5.Sum([]byte(strings.Join([]string{uploadInfo.ETag}, partSeparator)))
|
||||
if md5val := hex.EncodeToString(md5Sum[:]); md5val != upload.Hash {
|
||||
log.ZInfo(ctx, "CompleteUpload UploadTypePresigned", "getEtag", uploadInfo.ETag, "upload", upload, "etag[]", md5val, "upload hash:", upload.Hash, "key:", upload.Key)
|
||||
return nil, errors.New("upload md5 mismatching")
|
||||
return nil, fmt.Errorf("md5 mismatching %s != %s -> StatObject ETag %s", md5val, upload.Hash, uploadInfo.ETag)
|
||||
}
|
||||
// 防止在这个时候,并发操作,导致文件被覆盖
|
||||
copyInfo, err := c.impl.CopyObject(ctx, targetKey, upload.Key+"."+c.UUID())
|
||||
|
Loading…
x
Reference in New Issue
Block a user