0

I have uploaded few images in firebase storage, now i need the public http link of an image, not the download link which is like: com.google.android.gms.tasks.zzw@13xxxxx

I actually want a link that can pasted in the google search and show me that image like: https://firebasestorage.googleapis.com/v0/b/pay-a6698.appspot.com/o/images%2Fname%2Fprofile?alt=media&token=b0745cdc-3078-42a9-a574-03539fa64e1f

how to do this?

I did it like this but this, it link in the form : com.google.android.gms.tasks.zzw@13xxxxx

private fun getImageUrl(filename: String)=CoroutineScope(Dispatchers.IO).launch{

    var downloadUrl=imageRef.child("images/name/$filename").downloadUrl
    imageUrl=downloadUrl.toString()
    Log.d("url", imageUrl!!)


    //saving url in sharedPref

    val editor=sharedPrefCam.edit()
    editor.apply {
        putString("profileImgUrl", imageUrl)
        apply()
    }
}

i need the url pointed to in red enter image description here

chayan das
  • 86
  • 6
  • Please don't post screenshots of your code, or other textual content. Instead post the actual text, and use the formatting tools of Stack Overflow to mark it up. Also see: [Why not upload images of code/errors when asking a question?](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question) – Frank van Puffelen May 28 '22 at 12:34
  • Does this answer your question? [In Firebase after uploading Image how can I get Url?](https://stackoverflow.com/questions/40177250/in-firebase-after-uploading-image-how-can-i-get-url) – Dr.jacky May 28 '22 at 13:16
  • This com.google is not a download link.its a object. You are trying to print the object. – Dhruv Kaushal May 28 '22 at 14:16
  • Related question. https://stackoverflow.com/questions/37374868/how-to-get-url-from-firebase-storage-getdownloadurl – Marlon López May 28 '22 at 14:32

0 Answers0