FireBase存储布局:
我如何获得downloadURl
才能成功在Firebase存储中下载和上传图像。当我运行下面的代码时,我似乎总是以addOnFailureListener
结尾。
val storageRef = FirebaseStorage.getInstance().reference.child("image/Calendar.png")
storageRef.downloadUrl.addOnSuccessListener { uri ->
Picasso.with(applicationContext).load(uri.toString()).into(image)
Toast.makeText(applicationContext, uri.toString(), Toast.LENGTH_LONG).show()
}.addOnFailureListener(){
Toast.makeText(applicationContext, "fail", Toast.LENGTH_LONG).show()
}