- commit
- e9ab060
- parent
- de1beb0
- author
- Eric Bower
- date
- 2024-03-03 16:30:28 +0000 UTC
feat(pgs): support more file formats
2 files changed,
+21,
-0
+5,
-0
1@@ -75,6 +75,11 @@ func NewConfigSite() *shared.ConfigSite {
2 ".avif",
3 ".heif",
4 ".heic",
5+ ".opus",
6+ ".wav",
7+ ".mp3",
8+ ".mp4",
9+ ".mpeg",
10 },
11 MaxSize: maxSize,
12 MaxAssetSize: maxAssetSize,
1@@ -56,6 +56,22 @@ func GetMimeType(fpath string) string {
2 return "application/manifest+json"
3 } else if ext == ".xml" {
4 return "application/xml"
5+ } else if ext == ".avif" {
6+ return "image/avif"
7+ } else if ext == ".heif" {
8+ return "image/heif"
9+ } else if ext == ".heic" {
10+ return "image/heif"
11+ } else if ext == ".opus" {
12+ return "audio/opus"
13+ } else if ext == ".wav" {
14+ return "audio/wav"
15+ } else if ext == ".mp3" {
16+ return "audio/mpeg"
17+ } else if ext == ".mp4" {
18+ return "video/mp4"
19+ } else if ext == ".mpeg" {
20+ return "video/mpeg"
21 } else if ext == ".txt" {
22 return "text/plain"
23 }