admin管理员组文章数量:1291091
protected suspend fun uploadProfileImage(userId: String, imageUri: Uri): String {
val fileRef = storage.reference.child("profile_images/$userId.jpg")
fileRef.putFile(imageUri).await()
return fileRef.downloadUrl.await().toString()
}
protected suspend fun uploadExamImage(userId: String, imageUri: Uri, index: String): String {
val fileRef = storage.reference.child("exam_images/$userId/image_${index}_$imageUri.jpg")
fileRef.putFile(imageUri).await()
return fileRef.downloadUrl.await().toString()
}
Here, I'm trying to upload images to Firebase Storage. But before that, I had already written my whole project natively, and now I want to migrate. However, I'm facing this issue because Uri was imported like this: import android.Uri, so I can't use it, because I don't know how to import it in Compose Multiplatform.
本文标签:
版权声明:本文标题:ios - How can i upload image to firebase storage from compose multiplatform Uri? and why i can't use await? - Stack Over 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741524514a2383386.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论