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()
})