I am testing on Android. When a PDF file is opened, the progress value is stuck at 0, and it loads the PDF after a few seconds. I am using an HTTPS URL.
Sample URL: https://<file-url>/content?access_token=<access-token>
If I use the rn-fetch-blob package instead of react-native-blob-util, the progress is shown. Tested by changing the import in react-native-pdf/index.js:
import ReactNativeBlobUtil from 'rn-fetch-blob'
I doubt the issue is related to this - RonRadtke/react-native-blob-util#235,
But if I set useDownloadManager to true as given below in react-native-pdf/index.js, the progress is shown, but it gets stuck at the end and does not load the PDF.
this.lastRNBFTask = ReactNativeBlobUtil.config({
// response data will be saved to this path if it has access right.
path: tempCacheFile,
trusty: this.props.trustAllCerts,
addAndroidDownloads: {
useDownloadManager: true
}
})
Note
I am testing on Android. When a PDF file is opened, the progress value is stuck at 0, and it loads the PDF after a few seconds. I am using an HTTPS URL.
Sample URL:
https://<file-url>/content?access_token=<access-token>If I use the
rn-fetch-blobpackage instead ofreact-native-blob-util, the progress is shown. Tested by changing the import inreact-native-pdf/index.js:I doubt the issue is related to this - RonRadtke/react-native-blob-util#235,
But if I set
useDownloadManagertotrueas given below inreact-native-pdf/index.js, the progress is shown, but it gets stuck at the end and does not load the PDF.Note
Content-Lengthheader.https://morth.nic.in/sites/default/files/dd12-13_0.pdf