vinzscam/react-native-file-viewer

Problems displaying preview on iOS

ItsNoHax opened this issue · 3 comments

When trying to load an image downloaded to the RNFS's 'DocumentDirectoryPath'
It recognizes the file and extension but it cannot preview it. It also seems all the sharing options don't recognize the file properly. Should I be putting it somewhere else or?

Simulator Screen Shot - iPhone XS Max - 2019-03-15 at 10 14 13

Making some progress, first thing I found is that the image has to be directly in the root directory of /Documents, I tried to do /Documents/attachments/ and it wouldn't load.

Problem I'm running into now is that I need to open it twice? The first doesn't preview the image any subsequent times it will work perfectly.

Okay got it working, turns out I was awaiting RNFS.downloadFile instead of RNFS.downloadFile.promise

Thanks again for this nice library :)