mime 0.9.7 copy "mime: ^0.9.7" to clipboard
mime: ^0.9.7 copied to clipboard

outdated

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
}
486
likes
40
pub points
99%
popularity

Publisher

verified publishertools.dart.dev

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

Repository
Contributing

License

BSD-3-Clause (license)

More

Packages that depend on mime