Can't open pdf after download
See original GitHub issueConfigurations of my pdf
CONTENT-TYPE | application/octet-stream
My code
const downloadPdf = (uri: string, nome: string): void => {
setLoading(true)
const {config, fs} = RNFetchBlob
const PictureDir = fs.dirs.DownloadDir
const options = {
fileCache: true,
addAndroidDownloads: {
useDownloadManager: true,
notification: true,
title: nome,
path: `${PictureDir}/${nome}`,
},
appendExt: 'pdf',
}
config(options)
.fetch('GET', uri, {
// Accept: 'application/json',
// 'Content-Type': 'multipart/form-data,octet-stream',
'Content-Type': 'multipart/form-data',
})
.then((_) => {
Snackbar.show({
text: 'Download realizado com sucesso!',
backgroundColor: colors.silverTree,
})
})
.catch((_) => {
Snackbar.show({
text: 'Error ao realizar download!',
backgroundColor: colors.valencia,
})
})
.finally(() => setLoading(false))
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:17
Top Results From Across the Web
Can't open PDF - Adobe Support
Download the PDF and open it in Acrobat Reader or Acrobat · Right-click (Windows) or control-click (Mac OS) the link to the PDF...
Read more >6 Fixes to Try When Adobe Acrobat Reader Can't Open PDF ...
6 Fixes to Try When Adobe Acrobat Reader Can't Open PDF Files on Windows · Right-click on the Windows Start button and select...
Read more >PDF Won't Open? 3 Quick Ways to Fix 'can't open pdf' Error on ...
Your PDF files are not compatible with your PDF reader. Your PDF is infected by a virus. ; Run Adobe Reader. Select Help...
Read more >PDF won't open? How to Fix PDF Files not Opening Error
1. Install the latest version of Adobe Acrobat · 2. Disable the Protected mode at startup · 3. Download a third-party universal file...
Read more >Effective Methods to Fix "Cannot Open PDF" Error
Unsupported file type: This is the most common reason you cannot open PDF. · Outdated Acrobat or Adobe Reader: · PDF files created...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Was able to fix it by adding android:requestLegacyExternalStorage=“true” to my manifest file. Based on this https://medium.com/@sriramaripirala/android-10-open-failed-eacces-permission-denied-da8b630a89df
Hi @adaerodriguez,
I’m doing exactly this in my app. It works well on iOS ! However, on Android, it goes to a black screen on
And come back to the app. If i touch my notification on my phone, it redirects me to the file, which has been successfully downloaded on my phone.
Would you know what causes this issue ?
RN: 0.63.2 RN-Fetch-Blob: 0.12.0