Hi! I was trying to download a file from an URL like this ( https://xsd.ltd/6HOjk ), the problem that I got is when calling API to download the device (or simulator) can not detect the mime type, and then after downloading it is just a blank file like this:
It was working well on the android devices, maybe on android it automatically detects the mime type.
Here my package version:
"react-native": "0.62.2",
"rn-fetch-blob": "^0.12.0"
Did you guys get this situation yet?
Here is my code:
Hi! I was trying to download a file from an URL like this ( https://xsd.ltd/6HOjk ), the problem that I got is when calling API to download the device (or simulator) can not detect the mime type, and then after downloading it is just a blank file like this: It was working well on the android devices, maybe on android it automatically detects the mime type. Here my package version: "react-native": "0.62.2", "rn-fetch-blob": "^0.12.0" Did you guys get this situation yet? Here is my code:
const savedata = () => { let {url, fileName, type} = fileDetails; const { dirs: {DownloadDir, DocumentDir}, } = RNFetchBlob.fs; const {config} = RNFetchBlob; const isIOS = Platform.OS === "ios"; const aPath = Platform.select({ios: DocumentDir, android: DownloadDir});