mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-06 09:01:53 +00:00
LibWeb: Make MimeSniff::Resource::sniff() infallible
Everyone was already using this API as if it were infallible anyway.
This commit is contained in:
parent
5c20bc2afc
commit
600cb5ccba
Notes:
github-actions[bot]
2024-10-14 18:48:40 +00:00
Author: https://github.com/awesomekling
Commit: 600cb5ccba
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1796
7 changed files with 103 additions and 106 deletions
|
@ -488,7 +488,7 @@ void HTMLInputElement::did_select_files(Span<SelectedFile> selected_files, Multi
|
|||
for (auto& selected_file : selected_files) {
|
||||
auto contents = selected_file.take_contents();
|
||||
|
||||
auto mime_type = MUST(MimeSniff::Resource::sniff(contents));
|
||||
auto mime_type = MimeSniff::Resource::sniff(contents);
|
||||
auto blob = FileAPI::Blob::create(realm(), move(contents), mime_type.essence());
|
||||
|
||||
// FIXME: The FileAPI should use ByteString for file names.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue