FireBase Storage Layout:
How do I get my downloadURl
to successfully download and upload an image in Firebase storage. When I run the code below, I always seem to end at 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()
}