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

254
Visualizações
Firebase Storage - Web v9 - how to check if file exists in bucket?

Currently I'm using getDownloadURL() and error handling like this

const storage = getStorage();

async checkIfFileExists(filePath) {
        const docRef = ref(storage, filePath)
        try {
            await getDownloadURL(docRef)
            return true
        } catch (error) {
            return false
        }
    }

which works, but kind of feels like a workaround. So I'm wondering if this is the way to go or if there's a better alternative. Maybe I'm missing a build in way to directly request the existence? (with 'Web v9' options)

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

There isn't any direct way like exists() to check existence of a file. The V9 SDK just has a new API surface designed to facilitate tree-shaking but most of the functionality remains same.

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