After upload a file in Android Firebase Storage how get the file download Url? getDownloadUrl() not working

前端 未结 6 1800
無奈伤痛
無奈伤痛 2020-12-01 14:21

In my new android firebase project, I used com.google.firebase:firebase-storage:16.0.1 library.

I get the following Error:

I opened ano

6条回答
  •  佛祖请我去吃肉
    2020-12-01 14:52

    that's how I'm getting download link in kotlin android.

     ref.putFile(filePath!!)
                .addOnSuccessListener {
                val result = it.metadata!!.reference!!.downloadUrl;
                result.addOnSuccessListener {
    
                   val imageLink = it.toString()
    
    
                }
            }
    

提交回复
热议问题