package
0.0.0-20250226171102-4db14ec44d68
Repository: https://github.com/cozy/cozy-stack.git
Documentation: pkg.go.dev
# Functions
ByExtension calls mime.TypeByExtension, and removes optional parameters, to keep only the type and subtype.
FromReader takes a reader, sniffs the beginning of it, and returns the mime-type (no charset) and a new reader that's the concatenation of the bytes sniffed and the remaining reader.
Match returns the mime-type (no charset) if it can guess from the first bytes, or the default content-type else.
# Constants
DefaultType is the type used when we can't know/guess the filetype.