You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 25, 2024. It is now read-only.
I have code that's working fine in other Compose clients but on Android I'm getting following when calling getFileByteArray
01-14 19:37:45.657 22788 22788 E AndroidRuntime: java.lang.IllegalArgumentException: Uri lacks 'file' scheme: content://com.android.providers.media.documents/document/image%3A1000050843
01-14 19:37:45.657 22788 22788 E AndroidRuntime: at androidx.core.net.UriKt.toFile(Uri.kt:43)
01-14 19:37:45.657 22788 22788 E AndroidRuntime: at com.darkrockstudios.libraries.mpfilepicker.AndroidFile.getFileByteArray(AndroidFilePicker.kt:15)
following is code I have
val coroutineScope = rememberCoroutineScope()
val fileExtensions = listOf("jpg", "png")
FilePicker(show = show, fileExtensions = fileExtensions) { file ->
coroutineScope.launch {
val data = file?.getFileByteArray()
data?.let {
....
}
}
}