mime 1.0.3 copy "mime: ^1.0.3" to clipboard
mime: ^1.0.3 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
}
copied to clipboard
508
likes
0
points
5.04M
downloads

Publisher

verified publishertools.dart.dev

Weekly Downloads

2024.07.06 - 2025.01.18

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

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on mime