Open waqaramjad opened 1 year ago
+1
Hi I am using the latest version of this package and trying to download a simple pdf file, i can get the path of the downloaded file but that file does not appear in that location:
Platform: IPad
Here is my code:
const url = "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"; const dirPath = RNFetchBlob.fs.dirs.DownloadDir; const timestamp = new Date().getTime(); // Get current timestamp const fileName =
${timestamp}myfile.pdf; // Add timestamp to file name const filePath =
${dirPath}/${fileName}`;try { const response = await RNFetchBlob.config({ fileCache: true, path: filePath, }).fetch("GET", url); const path = response.path();
`
Try RNFetchBlob.fs.dirs.DocumentDir for IOS
Hi I am using the latest version of this package and trying to download a simple pdf file, i can get the path of the downloaded file but that file does not appear in that location:
Platform: IPad
Here is my code:
const url = "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"; const dirPath = RNFetchBlob.fs.dirs.DownloadDir; const timestamp = new Date().getTime(); // Get current timestamp const fileName =
${timestamp}myfile.pdf; // Add timestamp to file name const filePath =
${dirPath}/${fileName}`;`