mime 1.0.0
mime: ^1.0.0 copied to clipboard

Utilities for handling media (MIME) types, including determining a type from a file extension and file contents.

example/example.dart

import 'package:mime/mime.dart';

void main() {
  print(lookupMimeType('test.html'));
  // text/html

  print(lookupMimeType('test', headerBytes: [0xFF, 0xD8]));
  // image/jpeg

  print(lookupMimeType('test.html', headerBytes: [0xFF, 0xD8]));
  // image/jpeg
}
82
likes
130
pub points
99%
popularity

Utilities for handling media (MIME) types, including determining a type from a file extension and file contents.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploaders

dgrove@google.com
sigmund@google.com
kevmoo@google.com
kustermann@google.com
jakemac@google.com

License

BSD (LICENSE)

More

Packages that depend on mime