I am trying to download files from Azure Blob Storage. Instead of using some library/native code, we made it easy by using SAS tokens which are appended to the url of the file to be downloaded.
Using Expo’s FileSystem API, I am able to hit the url using FileSystem.downloadAsync
so the Promise returns and I get a 200 status, I can see the headers, and the content length is the correct file size. I have created the directory where I want the file to be stored using FileSystem.makeDirectoryAsync
so it exists. The path to be downloaded to is FileSystem.documentDirectory + 'Test-User/test.db
.
It seems like the file was downloaded successfully but the next time I try to do let files = await FileSystem.readDirectoryAsync(FileSystem.documentDirectory + 'Test-User')
I do not get anything there. Any idea where it might be going wrong?