mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-16 07:40:28 +00:00
Support for sending arbitrary file types
// FREEBIE
This commit is contained in:
@@ -158,6 +158,10 @@ public class MediaUtil {
|
||||
return ContentType.isVideoType(attachment.getContentType());
|
||||
}
|
||||
|
||||
public static boolean isVideo(String contentType) {
|
||||
return !TextUtils.isEmpty(contentType) && contentType.trim().startsWith("video/");
|
||||
}
|
||||
|
||||
public static @Nullable String getDiscreteMimeType(@NonNull String mimeType) {
|
||||
final String[] sections = mimeType.split("/", 2);
|
||||
return sections.length > 1 ? sections[0] : null;
|
||||
|
Reference in New Issue
Block a user