Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

251
Visualizações
Delete from list of files in firebase using refFromURL

I've searched all over the internet but I'm unable to delete a file from storage using refFromURL in firebase v9. I tried using firebase.storage().refFromURL(url) to fetch the path but its states that firebase.storage is not a function. Is their any work around in firebase v9?

  const deleteGalleryImage = (attachment, index) => {
    // console.log(getRefFromURL(attachment));
    let pictureRef =  firebase.storage().refFromURL(attachment);
    pictureRef
      .delete()
      .then(() => {
        setAttachments(attachments.filter((image) => image !== attachment));
      })
      .catch((error) => console.log(error));
}
 
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If you're using v9 then you can't use the namespace refFromUrl method anymore. The equivalent operation is now built into the top-level ref function.

So to get a ref from a URL, you'd do something like:

import { getStorage, ref } from "firebase/storage";

const storage = getStorage();

const storageRef = ref(storage, "your URL here");
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda