When a file is downloaded or uploaded, its content is sent as uint8Array. But the extension API is not preserving that type, instead when transferring the uint8Array between processes it is converted to an object automatically. In this fix, those objects are converted back to uint8Array which enables dApps to use the original fdp-storage API.
Unfortunately, I couldn't find a way to share code between the library and the main project. Because if the library references a file outside of its directory, then types are generated in wrong paths.
When a file is downloaded or uploaded, its content is sent as uint8Array. But the extension API is not preserving that type, instead when transferring the uint8Array between processes it is converted to an object automatically. In this fix, those objects are converted back to uint8Array which enables dApps to use the original fdp-storage API.