I try to write an extension caching some large media files used on my website so you can locally cache those files when the extension is installed:
- I pass the URLs via chrome.runtime.sendMessage to the extension (works)
- fetch the media file via XMLHttpRequest in the background page (works)
- store the file using FileSystem API (works)
- get a File object and convert it to a URL using URL.createObjectURL (works)
- return the URL to the webpage (error)
Unfortunately the URL can not be used on the webpage. I get the following error:
Not allowed to load local resource: blob:chrome-extension%3A//hlcoamoijhlmhjjxxxbl/e66a4ebc-1787-47e9-aaaa-f4236b710bda
What is the best way to pass a large file object from an extension to the webpage?