My extension uses an old library, which is a wrapper over HTML 5 Filesystem API for managing local files.
This library creates a persistent storage with requested size. Storage files can be accessed via the chrome-extension://{extensionID}/ link.
But from my extension page, I cannot access those images inside of an <img/> elements.
Since manifest v3, Filesystem API cannot be used directly in of the service_worker process, so I moved it to the offscreen page. It is working properly, files are being saved correctly, and they can be accessed and downloaded by the filesystem url.
I also know that in manifest v3 you should describe web_accessible_resources inside of your manifest.json file: https://developer.chrome.com/docs/extensions/reference/manifest/web-accessible-resources
So, this config probably should look like that:
"web_accessible_resources": [
{
"resources": ["persistent/*"],
"matches": ["<all_urls>"]
}
]
I did this, but still cannot access persisted files. Can you help me out, where could I have made a mistake?
I know that one solution would probably be to convert icons and images to base64 format, but still want to consider other solutions.
UPD: can it be that I am not able to access those files because my extension is unpacked?