From 00c38e2ca1209ba9611f2819094f01f99b83f92d Mon Sep 17 00:00:00 2001 From: Ricky Brundritt Date: Fri, 2 Aug 2024 15:13:31 -0700 Subject: [PATCH] Update PathUtils.cs --- HybridWebView/PathUtils.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/HybridWebView/PathUtils.cs b/HybridWebView/PathUtils.cs index b275f72..81b1753 100644 --- a/HybridWebView/PathUtils.cs +++ b/HybridWebView/PathUtils.cs @@ -151,6 +151,10 @@ public static bool TryGetMimeType(string? mimeTypeOrFileExtension, out string? m //Sanitize the content type. mimeType = mimeTypeOrFileExtension.ToLowerInvariant() switch { + //WebAssembly file types + "wasm" => "application/wasm", + "wat" => "application/wat", + //Image file types "png" => "image/png", "jpg" or "jpeg" or "jfif" or "pjpeg" or "pjp" => "image/jpeg", @@ -208,6 +212,7 @@ public static bool TryGetMimeType(string? mimeTypeOrFileExtension, out string? m "js" or "javascript" => "text/javascript", "css" => "text/css", "csv" => "text/csv", + "md" => "text/markdown", "plain" or "txt" => "text/plain", _ => null,