mime function
Implementation
String? mime(String? fileName) {
if (fileName == null || fileName.trim().isEmpty) {
return null;
}
final int lastDot = fileName.lastIndexOf('.', fileName.length - 1);
if (lastDot != -1) {
final String extension = fileName.substring(lastDot + 1);
return _mimeMaps[extension.toLowerCase()];
} else {
return null;
}
}