Skip to content

Instantly share code, notes, and snippets.

@peterkracik
Created June 26, 2020 04:59
Show Gist options
  • Select an option

  • Save peterkracik/e9d75d4d0717e76052b4234a89a2ba6c to your computer and use it in GitHub Desktop.

Select an option

Save peterkracik/e9d75d4d0717e76052b4234a89a2ba6c to your computer and use it in GitHub Desktop.
Retrieving download url from Firebase Storage
import { AngularFireStorage } from '@angular/fire/storage';
class MyClass {
constructor(private storage: AngularFireStorage) {}
public async getUrl(filepath: string) {
this.storage.ref(filePath)
.getDownloadURL() // it returns url value as observable
.subscribe((url: string) => {
// actions with url value
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment