Download of a blob url doesn't work on Android
See original GitHub issueBug description:
I’m generating a blob URL of an audio and putting it into a link tag <a>
with the download
attr. It works well on the browser, but when I click the link on the React Native Webview nothing happens (no errors).
I thought that it was a permission problem, so I added the WRITE_EXTERNAL_STORAGE to AndroidManifest and requested the permission when the app starts, but it didn’t work.
To Reproduce:
// Create a blob URL and pass it to a link tag
// Try to download the audio on the Webview
const blob = new Blob([], { type: 'audio/webm' })
const url = URL.createObjectURL(blob)
<a href={url} download="audio.mp3">Click to Download</a>
Expected behavior: The audio must be downloaded to the user’s phone.
Screenshots/Videos: App.tsx
AndroidManifest.xml
Environment:
- react-native version: 0.67.4
- react-native-webview version: 11.17.2
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:5
Top Results From Across the Web
How to download blob url in webview - android - Stack Overflow
i used this code in my project and is worked for me, try it! and don't forget to add this code to onCreateView...
Read more >JS blob download button dosent work on android or IOS
Solution: Here's an answer to a similar question:https://stackoverflow.com/questions/15293694/blob-constructor-browser-compatibilityIt ...
Read more >ultimatewebview downloading error | B4X Programming Forum
Only problem i am facing is downloading the files (Excel and pdf Files) ... Download Blob file from Website inside Android WebViewClient
Read more >Fix file download errors - Google Chrome Help
If you receive an error message on Chrome when you try to download apps, themes, extensions or other files, try these fixes. Fix...
Read more >7 Quick Solutions to Download Blob Videos (Tested and Free)
Open a blob video. Right-click the page. Choose "Inspect". In the "Element" tab, Ctrl + F and search the keyword "blob ...
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
Did you solve it, @LuanEdCosta ?
+1 pls helppp