Skip to content

Instantly share code, notes, and snippets.

@NickIliev
Created November 22, 2018 13:48
Show Gist options
  • Save NickIliev/c4678d75a3f488a5410fc36ae646d136 to your computer and use it in GitHub Desktop.
Save NickIliev/c4678d75a3f488a5410fc36ae646d136 to your computer and use it in GitHub Desktop.
Firebase Storage Delete File (NativeScript)
deleteFile() {
storage.deleteFile({
// 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/firebase-storage.png'
}).then(() => {
console.log("File deleted from Firebase Storage.");
}).catch(error => {
console.log("File deletion Error: " + error);
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment