aboutsummaryrefslogtreecommitdiff
path: root/utils/format/image.go
blob: b68271c6b73a95d43f92882dbf10c6ce8da42bec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package format

import (
	"imageboard/config"
	"strings"
)

func GetCDNURL() string {
	cdnURL := strings.TrimRight(config.S3.PublicURL, "/") + "/" + config.S3.BucketName
	if config.S3.FolderPath != "" {
		cdnURL += "/" + config.S3.FolderPath
	}
	return cdnURL
}