hoi151501
hoi151501

Reputation: 21

React Native - Cannot read property 'DocumentDir' of null

Why my rn-fetch-blob package error? "Cannot read property 'DocumentDir' of null" I just want to convert my blob video to fetch a localURL Anyone can help me plz!!

i try to rebuild or install react-native-blob-util still error. but react-native-blob-util error is "Cannot read property 'getConstants' of null"

"react-native": "0.71.7", "rn-fetch-blob": "^0.12.0",

Upvotes: 1

Views: 1099

Answers (1)

Zeeshan Anwar
Zeeshan Anwar

Reputation: 87

Here is how I have used the rn-fetch-blob plugin:

const { dirs } = RNFetchBlob.fs
const dirToSave = Platform.OS == 'ios' ? dirs.DocumentDir : dirs.DownloadDir

Check with the above way if it's working or not.

Upvotes: 0

Related Questions