diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-05-15 12:24:26 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-16 12:48:39 +0200 |
commit | bcfa4a34a1d6273bf55526b2a7d91316de6e3ce5 (patch) | |
tree | 96c87a0aa5f27479595af3df3f6cbcd4ecd1a8ef /Userland/Libraries/LibCore | |
parent | 63d2b26b17dfac2f723484215efd84397bbc154c (diff) | |
download | serenity-bcfa4a34a1d6273bf55526b2a7d91316de6e3ce5.zip |
LibCore: Support the WebM file extension when determining MIME type
This enables, for example, navigating to a file:// URL in Ladybird with
a .webm file extension.
Diffstat (limited to 'Userland/Libraries/LibCore')
-rw-r--r-- | Userland/Libraries/LibCore/MimeData.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCore/MimeData.cpp b/Userland/Libraries/LibCore/MimeData.cpp index eb149c29ad..db9886bb43 100644 --- a/Userland/Libraries/LibCore/MimeData.cpp +++ b/Userland/Libraries/LibCore/MimeData.cpp @@ -100,6 +100,8 @@ StringView guess_mime_type_based_on_filename(StringView path) return "text/csv"sv; if (path.ends_with(".sheets"sv, CaseSensitivity::CaseInsensitive)) return "application/x-sheets+json"sv; + if (path.ends_with(".webm"sv, CaseSensitivity::CaseInsensitive)) + return "video/webm"sv; // FIXME: Share this, TextEditor and HackStudio language detection somehow. auto basename = LexicalPath::basename(path); if (path.ends_with(".cpp"sv, CaseSensitivity::CaseInsensitive) |