mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 02:42:19 +08:00
fix: find error
This commit is contained in:
parent
eec66dabb7
commit
c962a501b0
@ -61,11 +61,15 @@ func (t *thirdServer) InitiateMultipartUpload(ctx context.Context, req *third.In
|
|||||||
if err := checkUploadName(ctx, req.Name, t.config); err != nil {
|
if err := checkUploadName(ctx, req.Name, t.config); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
log.ZDebug(ctx, "1111111111111111111111111", t.config)
|
log.ZDebug(ctx, "1111111111111111111111111")
|
||||||
expireTime := time.Now().Add(t.defaultExpire)
|
expireTime := time.Now().Add(t.defaultExpire)
|
||||||
|
log.ZDebug(ctx, "222222222222222222222222")
|
||||||
result, err := t.s3dataBase.InitiateMultipartUpload(ctx, req.Hash, req.Size, t.defaultExpire, int(req.MaxParts))
|
result, err := t.s3dataBase.InitiateMultipartUpload(ctx, req.Hash, req.Size, t.defaultExpire, int(req.MaxParts))
|
||||||
|
log.ZDebug(ctx, "33333333333333333333333", err)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.ZDebug(ctx, "4444444444444444444", err)
|
||||||
if haErr, ok := errs.Unwrap(err).(*cont.HashAlreadyExistsError); ok {
|
if haErr, ok := errs.Unwrap(err).(*cont.HashAlreadyExistsError); ok {
|
||||||
|
log.ZDebug(ctx, "55555555555555555", err)
|
||||||
obj := &relation.ObjectModel{
|
obj := &relation.ObjectModel{
|
||||||
Name: req.Name,
|
Name: req.Name,
|
||||||
UserID: mcontext.GetOpUserID(ctx),
|
UserID: mcontext.GetOpUserID(ctx),
|
||||||
@ -76,18 +80,18 @@ func (t *thirdServer) InitiateMultipartUpload(ctx context.Context, req *third.In
|
|||||||
Group: req.Cause,
|
Group: req.Cause,
|
||||||
CreateTime: time.Now(),
|
CreateTime: time.Now(),
|
||||||
}
|
}
|
||||||
log.ZDebug(ctx, "222222222222222222222222222222222222")
|
log.ZDebug(ctx, "22222222222222222222222222222222222245555555555555")
|
||||||
if err := t.s3dataBase.SetObject(ctx, obj); err != nil {
|
if err := t.s3dataBase.SetObject(ctx, obj); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
log.ZDebug(ctx, "333333333333333333333333333333333333")
|
log.ZDebug(ctx, "333333333333333333333333333333333333788888888888888888")
|
||||||
return &third.InitiateMultipartUploadResp{
|
return &third.InitiateMultipartUploadResp{
|
||||||
Url: t.apiAddress(obj.Name),
|
Url: t.apiAddress(obj.Name),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
log.ZDebug(ctx, "4444444444444444444444444444444444444444")
|
log.ZDebug(ctx, "4444444444444444444444444444444444444444000000000000")
|
||||||
var sign *third.AuthSignParts
|
var sign *third.AuthSignParts
|
||||||
if result.Sign != nil && len(result.Sign.Parts) > 0 {
|
if result.Sign != nil && len(result.Sign.Parts) > 0 {
|
||||||
sign = &third.AuthSignParts{
|
sign = &third.AuthSignParts{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user