0

I am using rn-fetch-blob package to download files with any file to my device from an api call. I gave specific download path if the app is being used in android. If the app is being used in iOS, I specified the path as RNfetchblob.dirs.DocumentsDir+/filename/. The downloaded files can be viewed in file manager in android. But in iOS, as there is no concept of file manager, where should I be able to view the downloaded files. Thanks in advance.

1 Answers1

0

On iOS you cannot directly view a file, as there's no official file manager letting you do such a thing.

If you have downloaded something like an image, you can still access it and use them in your components.

For example, an image using the rnfetchBlob file would be:

 <Image source {{Platform.OS === 'ios'?RNfetchblob.dirs.DocumentsDir + /filename + '.' + extension:
   "file://"+ RNfetchblob.dirs.DocumentsDir + /filename + '.' + extension}}
Auticcat
  • 4,359
  • 2
  • 13
  • 28