Serve brand assets as static files via /api/files/v1/static instead of S3
Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
BIN
pkg/brand/assets/probo-gray-small.png
Normal file
BIN
pkg/brand/assets/probo-gray-small.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
pkg/brand/assets/probo.png
Normal file
BIN
pkg/brand/assets/probo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
25
pkg/brand/brand.go
Normal file
25
pkg/brand/brand.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package brand
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
)
|
||||
|
||||
var (
|
||||
//go:embed assets
|
||||
staticAssets embed.FS
|
||||
|
||||
Assets fs.FS
|
||||
|
||||
DefaultPoweredByLogoPath string = "/api/files/v1/static/probo-gray-small.png"
|
||||
DefaultSenderCompanyLogoPath string = "/api/files/v1/static/probo.png"
|
||||
)
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
|
||||
Assets, err = fs.Sub(staticAssets, "assets")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user