Merge pull request #2256 from deltachat/adb/issue-2197

avoid null mime type
This commit is contained in:
Asiel Díaz Benítez
2022-04-02 10:46:11 -04:00
committed by GitHub
@@ -82,6 +82,9 @@ public class MediaUtil {
if (type == null) {
final String extension = MimeTypeMap.getFileExtensionFromUrl(uri.toString());
type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension.toLowerCase());
if (type == null) {
type = "application/octet-stream";
}
}
return getCorrectedMimeType(type);
}