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

253
Visualizações
Expo DownloadAsync don't download files which contains spaces in filename

I have a problem with DownloadAsync when trying to download files from Firebase storage. If filename doesn't contain spaces it works fine and file is downloaded to app, but if it have a space in file name, then that file is ignored and not downloaded. Problem appears only in iOS, with Android I did't have this problem.

Also Firebase gives me a link for that file, so there is no problem with Firebase.

This is how my code looks:

await getDownloadURL(
   ref(
      storage,
      `/images/objects/${touristObject.id}/${file}`
   )
)
.then(async (url) => {
   const fileReference = 
      `${FileSystem.documentDirectory}images/objects/${touristObject.id}`

   await FileSystem.makeDirectoryAsync(
      fileReference,
      { intermediates: true }
   )
                                      
   await FileSystem.downloadAsync(
      url,
      `${fileReference}/${file}`
   )
   .then((uri) => { resolve() })
   .catch((error) => {
      console.warn(error)
      resolve()
   })
})
.catch((error) => {
   console.warn(error)
   resolve()
})
about 4 years ago · Juan Pablo Isaza
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