Checks if the file has a specific MIME type.
bool isMimeType(String type) { if (contentType == null) return false; return contentType!.toLowerCase().contains(type.toLowerCase()); }