mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
Fix videos losing their extension after forwarding.
Special thanks to @signalien Fixes #7783
This commit is contained in:
parent
2882ef6d9f
commit
2acbea014b
@ -69,8 +69,8 @@ public class MediaUtil {
|
||||
public static @Nullable String getMimeType(Context context, Uri uri) {
|
||||
if (uri == null) return null;
|
||||
|
||||
if (PersistentBlobProvider.isAuthority(context, uri)) {
|
||||
return PersistentBlobProvider.getMimeType(context, uri);
|
||||
if (PartAuthority.isLocalUri(uri)) {
|
||||
return PartAuthority.getAttachmentContentType(context, uri);
|
||||
}
|
||||
|
||||
String type = context.getContentResolver().getType(uri);
|
||||
@ -78,6 +78,7 @@ public class MediaUtil {
|
||||
final String extension = MimeTypeMap.getFileExtensionFromUrl(uri.toString());
|
||||
type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension.toLowerCase());
|
||||
}
|
||||
|
||||
return getCorrectedMimeType(type);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user