Added the MP4 and WOFF2 cases to the AssetExtension enumeration.
This commit is contained in:
@@ -10,6 +10,8 @@ public enum AssetExtension: String, CaseIterable, Sendable {
|
||||
case jpg
|
||||
/// A JavaScript file.
|
||||
case js
|
||||
/// An MPEG-4 video.
|
||||
case mp4
|
||||
/// A Portable Network Graphics image.
|
||||
case png
|
||||
/// A Scalable Vector Graphics image.
|
||||
@@ -20,6 +22,8 @@ public enum AssetExtension: String, CaseIterable, Sendable {
|
||||
case webmanifest
|
||||
/// A WebP image.
|
||||
case webp
|
||||
/// A Web Open Font Format 2 font.
|
||||
case woff2
|
||||
/// An Extensible Markup Language file.
|
||||
case xml
|
||||
}
|
||||
@@ -37,11 +41,13 @@ public extension AssetExtension {
|
||||
case .ico: "image/vnd.microsoft.icon"
|
||||
case .jpg: "image/jpeg"
|
||||
case .js: "text/javascript"
|
||||
case .mp4: "video/mp4"
|
||||
case .png: "image/png"
|
||||
case .svg: "image/svg+xml"
|
||||
case .txt: "text/plain"
|
||||
case .webmanifest: "application/manifest+json"
|
||||
case .webp: "image/webp"
|
||||
case .woff2: "font/woff2"
|
||||
case .xml: "application/xml"
|
||||
}
|
||||
}
|
||||
@@ -52,8 +58,9 @@ public extension AssetExtension {
|
||||
case .css: "css"
|
||||
case .js: "js"
|
||||
case .jpg,
|
||||
.mp4,
|
||||
.webp: "media"
|
||||
.webp: "img"
|
||||
case .mp4: "video"
|
||||
case .woff2: "font"
|
||||
default: nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user