private static String getFilePathFromContent(Uri uri, Context context) {
        String[] proj = {MediaStore.Images.Media.DATA};
        try (Cursor cursor = context.getContentResolver().query(uri, proj, null, null, null)) {
            int index = cursor.getColumnIndex(MediaStore.Images.Media.DATA);
            if (index == -1) {
                return null;
            }
            cursor.moveToFirst();
            return cursor.getString(index);
        }
    }
Verifies the content typs of a file URI. A helper function
for isVideoType and isImageType

@param contentMimeType - "video/" or "image/"
@param uri             - file uri
@param context         - react context
@return a boolean to determine if file is of specified content type i.e. image or video
android/src/main/java/com/imagepicker/Utils.java