The manifest.json spec supports declaring “file_handlers” mapped to a URL action. Only supported in Chrome and Edge at the moment. The action URL could be handled by the service worker, so there’s no need for files to be sent over the network if all the processing can happen offline.