feat: setup direct access to minio endpoint to images and avatars buckets through /s3/ path

This commit is contained in:
2025-07-29 20:57:36 +03:00
parent e15ee90a62
commit ed044590a0
3 changed files with 86 additions and 2 deletions

View File

@@ -22,11 +22,12 @@ import (
"net/url"
"time"
"github.com/gin-gonic/gin"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
)
func NewMinioClient() *minio.Client {
func NewMinioClient(router *gin.Engine) *minio.Client {
cfg := config.GetConfig()
if cfg.MinioUrl == "" {
@@ -54,6 +55,7 @@ func NewMinioClient() *minio.Client {
}
setupBuckets(client)
setupGinEndpoint(router)
return client
}