Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Type ¶
Type returns the MIME type of the content read from the provided reader. It first checks if the reader provides Name() and uses both file extension and content sniffing, falling back to content sniffing only when no name is available.
This function consumes up to 512 bytes from r while sniffing content type. If callers need to read the full stream afterward, they should buffer and replay those bytes (or use a seekable reader and rewind). Returns application/octet-stream if the MIME type cannot be determined.
func TypeByExtension ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.