source: src/utils/delete-from-firebase-storage.ts@ 5d6f37a

main
Last change on this file since 5d6f37a was 5d6f37a, checked in by Naum Shapkarovski <naumshapkarovski@…>, 7 weeks ago

add customer

  • Property mode set to 100644
File size: 526 bytes
Line 
1import { ref, deleteObject } from 'firebase/storage';
2import { storage } from 'src/lib/firebase';
3
4/**
5 * Deletes a file from Firebase Cloud Storage.
6 *
7 * @param path - The path in Firebase Storage where the file is stored.
8 * @returns A promise that resolves once the deletion is complete.
9 */
10async function deleteFromFirebaseStorage(path: string): Promise<void> {
11 const storageRef = ref(storage, path);
12
13 // Delete the object from the path
14 await deleteObject(storageRef);
15}
16
17export default deleteFromFirebaseStorage;
Note: See TracBrowser for help on using the repository browser.