mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Merge pull request #2256 from deltachat/adb/issue-2197
avoid null mime type
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user