Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to delete file from firebase storage on web

// firebase V9 delete file from storage
import { ref, deleteObject } from "firebase/storage";

async function deleteFile() {
      const fileRef = ref(storage, fileLocation);
      const snapshot = await deleteObject(fileRef);
      console.log(snapshot);
}
 
PREVIOUS NEXT
Tagged: #delete #file #firebase #storage #web
ADD COMMENT
Topic
Name
5+4 =