You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions
In my chrome extension, I would like to store files in the browser (from background script) but not on disk, as I would like to read and erase the files quickly. Is the best solution to use blob URLs? If so, how much data can I store as blob URLs? Or should I just store the file contents in an array in the background script?
ilyaigpetrov
unread,
Nov 30, 2021, 9:09:46 AM11/30/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions, bazz...@gmail.com
Blob-urls don't survive extension restarts.
To persist between restarts you have to use chrome.storage.
After reading data from chrome.storage you may construct a data-url [1] or blob-url from it.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions, ilyaigpetrov, bazz...@gmail.com
Alternatively you can use IndexedDB to store files. Personally I'd recommend using IndexedDB because it's a web platform feature and there are a number of articles and libraries out there covering how to use it to store files. In fact, just now when I did a Google search for "indexeddb file storage" I found Robert Nyman's Storing images and files in IndexedDB post on the Mozilla Hacks blog.
Simeon - @dotproto
Chrome Extensions DevRel
Mohamad Bazzi
unread,
Dec 1, 2021, 6:33:05 PM12/1/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Simeon Vincent, Chromium Extensions, ilyaigpetrov