Answers for "android upload file to firebase storage via uri"

1

how to upload files to firebase storage

async function uploadBlob(file: Blob | Uint8Array | ArrayBuffer, path: string) {
  try {
    const uploadTaskSnapShot = await storage.ref(path).put(file);
    let url: string = await uploadTaskSnapShot.ref.getDownloadURL();
    return url;
  } catch (error) {
    throw new Error("Could not upload file");
  }
}
Posted by: Guest on September-07-2021

Code answers related to "android upload file to firebase storage via uri"

Browse Popular Code Answers by Language