Skip to content

Instantly share code, notes, and snippets.

@NickIliev
Last active November 22, 2018 13:42
Show Gist options
  • Save NickIliev/fb9b3c338f3edc0e6d390ec8c5fdc2f9 to your computer and use it in GitHub Desktop.
Save NickIliev/fb9b3c338f3edc0e6d390ec8c5fdc2f9 to your computer and use it in GitHub Desktop.
Firebase Storage get Download URL (NativeScript)
getDownloadUrl() {
storage.getDownloadUrl({
// optional, can also be passed during init() as 'storageBucket' param so we can cache it
bucket: APPSPOT_BUCKET_URL,
// the full path of an existing file in your Firebase storage
remoteFullPath: 'uploads/images/happy-homer-meme.png'
}).then(downloadURL => {
console.log("Download URL: " + downloadURL);
}).catch(error => {
console.log("Error: " + error);
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment