rn-fetch-blob

Download a pdf and save to device (ios and android) in react-native

做~自己de王妃 提交于 2021-01-29 20:23:51
问题 I am pretty new to react-native (app development as such). I want to download and save a pdf file in user's device in react-native? react-native-fs and rn-fetch-blob showed up as popular options. I am using redux-saga in my project and axios to fetch json data. I am able to get a blob object of the pdf file using axios. So, how can i achieve this downloading and saving the file in the device? Can i use axios plus some library to get the file from blob object or should i be using either react

Download a pdf and save to device (ios and android) in react-native

╄→гoц情女王★ 提交于 2021-01-29 16:56:17
问题 I am pretty new to react-native (app development as such). I want to download and save a pdf file in user's device in react-native? react-native-fs and rn-fetch-blob showed up as popular options. I am using redux-saga in my project and axios to fetch json data. I am able to get a blob object of the pdf file using axios. So, how can i achieve this downloading and saving the file in the device? Can i use axios plus some library to get the file from blob object or should i be using either react

React Native Fetch Blob creating issue while pod install on iOS

橙三吉。 提交于 2021-01-20 08:45:49
问题 I've install react-native-fetch-blob on react-native version 0.60.5 .While I run pod install , the error appears as you can see in the Kindly guide me on how to resolve this issue 回答1: Go to ./node-module/react-native-fetch-blob/react-native-fetch-blob.podspec & change s.dependency 'React/Core' to s.dependency 'React-Core' Hope this helps you. Feel free for doubts. 回答2: you can use this instead for the new version of react native 0.60 and up https://github.com/joltup/rn-fetch-blob 来源: https:/

React Native Fetch Blob creating issue while pod install on iOS

这一生的挚爱 提交于 2021-01-20 08:45:28
问题 I've install react-native-fetch-blob on react-native version 0.60.5 .While I run pod install , the error appears as you can see in the Kindly guide me on how to resolve this issue 回答1: Go to ./node-module/react-native-fetch-blob/react-native-fetch-blob.podspec & change s.dependency 'React/Core' to s.dependency 'React-Core' Hope this helps you. Feel free for doubts. 回答2: you can use this instead for the new version of react native 0.60 and up https://github.com/joltup/rn-fetch-blob 来源: https:/

Download Audio file in react native?

蹲街弑〆低调 提交于 2020-05-07 09:16:58
问题 I'm trying to download audio file "mp3" using rn-fetch-blob . So I have more than one cases :) When I trying to add a path to RNFetchBlob config like this const pathFile = RNFetchBlob.fs.dirs.MainBundleDir // Or .DocumentDir // Others is crashed my App 'Android'; The callback "then" get success so it's Log The file is saved to /data/user/0/com.music/files/RNFetchBlobTmp_1ueoigyb8hoscuuizzsue.mp3 But when I try to explore this file in my real device I can't find them I don't know why! So there

Download Audio file in react native?

好久不见. 提交于 2020-05-07 09:16:19
问题 I'm trying to download audio file "mp3" using rn-fetch-blob . So I have more than one cases :) When I trying to add a path to RNFetchBlob config like this const pathFile = RNFetchBlob.fs.dirs.MainBundleDir // Or .DocumentDir // Others is crashed my App 'Android'; The callback "then" get success so it's Log The file is saved to /data/user/0/com.music/files/RNFetchBlobTmp_1ueoigyb8hoscuuizzsue.mp3 But when I try to explore this file in my real device I can't find them I don't know why! So there

How to read JSON file with React-Native-fs

耗尽温柔 提交于 2019-12-20 05:56:27
问题 I have a asset.json file with content, and need to read it within an react-native app. I already figured that it must be manually copied to the native implementation and I can verify the file is there (and readable: -rw-r--r--). Since its there and I'm using promises to obtain it, please tell me whe the output is still: {"_40":0,"_65":0,"_55":null,"_72":null} and not the content of the file. const path = RNFetchBlob.fs.dirs.DocumentDir + '/' + ASSET_FILENAME; if (await RNFS.exists(path)){