Files
IUQT/pushNotificationCenter/biz/dal/file/file.go

13 lines
393 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package file
import (
"fmt"
"pushNotificationCenter/config"
)
// 生成永久访问URL基于存储桶域名和对象路径
func GetPermanentURL(bucketName, objectKey string) string {
// 格式: http://<minio-api地址>/<桶名>/<对象键>
return fmt.Sprintf(`http://%s:%s/api/v1/buckets/%s/objects/download?prefix=%s`, config.MinioHost, config.MinioPort, bucketName, objectKey)
}