add minio and file upload

This commit is contained in:
2026-07-08 18:42:08 +05:00
parent be3dc28e68
commit d6555e1133
364 changed files with 137053 additions and 22 deletions

16
pkg/minio/minio.go Normal file
View File

@@ -0,0 +1,16 @@
package minio
import (
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
)
// Connect initializes a MinIO client using the given credentials. Callers
// are expected to source endpoint/accessKey/secretKey from configuration
// rather than hardcoding them.
func Connect(endpoint, accessKey, secretKey string, useSSL bool) (*minio.Client, error) {
return minio.New(endpoint, &minio.Options{
Creds: credentials.NewStaticV4(accessKey, secretKey, ""),
Secure: useSSL,
})
}