mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:37:44 +00:00
LibCore: Implement basic mime type guessing based on binary patterns
This attempts to guess the mime-type from a given set of bytes from the start of a file. It only supports a few well-defined patterns for now, but it's a start!
This commit is contained in:
parent
1069979ddf
commit
cf5f3a9874
2 changed files with 33 additions and 0 deletions
|
@ -49,4 +49,6 @@ private:
|
|||
|
||||
String guess_mime_type_based_on_filename(const StringView&);
|
||||
|
||||
Optional<String> guess_mime_type_based_on_sniffed_bytes(const ReadonlyBytes&);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue