. var imageUriPath = "" imageUriPath = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { val split = (imageUri.path ?: "").split( ":")//split the path. split[1] } else { imageUri.path ?: "" } val file = File(imageUriPath)
add Add in onActivityResult onActivityResult, getting docx, or pdf file
*** hope it helps 🐬🐬🐬
var imageUriPath = "" imageUriPath = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { val split = (imageUri.path ? : "").split(":") //split the path. split[1] } else { imageUri.path ? : "" } val file = File(imageUriPath)