mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
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.
This commit is contained in:
committed by
Andreas Kling
parent
63d2b26b17
commit
bcfa4a34a1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user