How to get URL from Firebase Storage getDownloadURL

后端 未结 10 2040
小蘑菇
小蘑菇 2020-11-21 04:54

I\'m trying to get the \"long term persistent download link\" to files in our Firebase storage bucket. I\'ve changed the permissions of this to

service fireb         


        
10条回答
  •  青春惊慌失措
    2020-11-21 05:42

    For me, I did my code in Kotlin and I had the same error "getDownload()". Here are both the dependencies that worked for me and the Kotlin code.

    implementation 'com.google.firebase:firebase-storage:18.1.0' firebase storage dependencies

    This what I added and it worked for me in Kotlin. Storage() would come before Download()

    profileImageUri = taskSnapshot.storage.downloadUrl.toString()
    

提交回复
热议问题