Skip to content

Commit

Permalink
Adds TIFF and WebP HTTP Media Types (#3194)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>
  • Loading branch information
qalandarov and 0xTim committed Jun 4, 2024
1 parent 12e9b41 commit a46552b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/Vapor/HTTP/Headers/HTTPMediaType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ public extension HTTPMediaType {
static let png = HTTPMediaType(type: "image", subType: "png")
/// SVG image.
static let svg = HTTPMediaType(type: "image", subType: "svg+xml")
/// TIFF image.
static let tiff = HTTPMediaType(type: "image", subType: "tiff")
/// WebP image.
static let webp = HTTPMediaType(type: "image", subType: "webp")
/// Basic audio.
static let audio = HTTPMediaType(type: "audio", subType: "basic")
/// MIDI audio.
Expand Down Expand Up @@ -638,6 +642,7 @@ let fileExtensionMediaTypeMapping: [String: HTTPMediaType] = [
"svgz": HTTPMediaType(type: "image", subType: "svg+xml"),
"tiff": HTTPMediaType(type: "image", subType: "tiff"),
"tif": HTTPMediaType(type: "image", subType: "tiff"),
"webp": HTTPMediaType(type: "image", subType: "webp"),
"djvu": HTTPMediaType(type: "image", subType: "vnd.djvu"),
"djv": HTTPMediaType(type: "image", subType: "vnd.djvu"),
"ico": HTTPMediaType(type: "image", subType: "vnd.microsoft.icon"),
Expand Down

0 comments on commit a46552b

Please sign in to comment.