private val storageRef = Firebase.storage.reference
fun uploadFile(file: File): String {
val url = ""
// code for uploading image
val stream = FileInputStream(file)
storageRef.child("images/" + file.name).putStream(stream)
return url
}
As you can see, I put the file into the storage server, but I need a way to reference it later on in my app. Through the website, you can get a URL for uploaded files, so I assume there is a way to do that through code. The documentation isn't very easy to understand for Firebase.