Mime-type of stream
The @flystorage/stream-mime-type
package provides a utility to determine the mime-type of
a stream in a non-destructive way.
Underneath, the package uses the file-type
and mime-types
packages to resolve the mime-type
of the stream. It first tries to determine the mime-type based on the file contents and will fall
back to resolving it based on the file extension.
Installation
Usage
Resolve a mime-type:
Sampling the start of a stream: