Hi i want to get downloadUrl but i got error I'm tried some methods like this
var firebaseURL =p0?.uploadSessionUri.toString()
the result is url but if i open this url, i get this error Invalid request. X-Goog-Upload-Command header is missing.
( i'm new in kotlin)
uploadTo.addOnSuccessListener (object :OnSuccessListener<UploadTask.TaskSnapshot>{
override fun onSuccess(p0: UploadTask.TaskSnapshot?) {
var firebaseURL =p0.downloadUrl // i got error in this line
FirebaseDatabase.getInstance().reference
.child("Users")
.child(FirebaseAuth.getInstance().currentUser?.uid!!)
.child("imagurl")
.setValue(firebaseURL.toString())
}
})