For an example, if I was making an extension that played a notification noise and I wanted to let the user set an audio file to use as the notification sound, how would I save that in the add-on?
As far as I’m aware, the <input>
element for a file passes a fake filepath to Firefox, so I couldn’t just store the file path in the Storage API (it would be weird if Firefox allowed extensions to just access files like that away).
Would I need to have JavaScript make a Blob() from the file and store that in the Storage API? Is that even allowed? Is there a better way to do it?