fix: minio unable to upload files larger than 5mb (#931)

* fix: create group type limit

* fix: group notification

* fix: group notification

* fix: group notification

* chore: group member hash

* chore: group member hash

* chore: group member hash

* chore: group member hash

* test: log

* test: log

* test: log

* test: log

* test: log

* sync: hash code

* sync: hash code

* sync: hash code

* test: log

* test: log

* test: log

* test: log

* test: log

* fix: time stamp

* fix: minio sign endpoint opts

* cicd: robot automated Change

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: minio bucket url

---------

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: withchao <withchao@users.noreply.github.com>
pull/945/head
withchao 1 year ago committed by GitHub
parent a22a0e5b52
commit 19343fef62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -77,15 +77,15 @@ func NewMinio() (s3.Interface, error) {
return nil, err return nil, err
} }
m := &Minio{ m := &Minio{
bucket: conf.Bucket, bucket: conf.Bucket,
bucketURL: conf.Endpoint + "/" + conf.Bucket + "/", core: &minio.Core{Client: client},
core: &minio.Core{Client: client}, lock: &sync.Mutex{},
lock: &sync.Mutex{}, init: false,
init: false,
} }
if conf.SignEndpoint == "" || conf.SignEndpoint == conf.Endpoint { if conf.SignEndpoint == "" || conf.SignEndpoint == conf.Endpoint {
m.opts = opts m.opts = opts
m.sign = m.core.Client m.sign = m.core.Client
m.bucketURL = conf.Endpoint + "/" + conf.Bucket + "/"
} else { } else {
su, err := url.Parse(conf.SignEndpoint) su, err := url.Parse(conf.SignEndpoint)
if err != nil { if err != nil {
@ -99,6 +99,7 @@ func NewMinio() (s3.Interface, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
m.bucketURL = conf.SignEndpoint + "/" + conf.Bucket + "/"
} }
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel() defer cancel()

@ -16,6 +16,7 @@ package data_conversion
import ( import (
"fmt" "fmt"
"github.com/Shopify/sarama" "github.com/Shopify/sarama"
) )

@ -17,11 +17,13 @@ package data_conversion
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "time"
"github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/log"
"gorm.io/driver/mysql" "gorm.io/driver/mysql"
"gorm.io/gorm" "gorm.io/gorm"
"time"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
) )
var ( var (

Loading…
Cancel
Save