Cannot preload data from ipfs-js

One path that might be worth exploring is running a Kubo node and exposing the add endpoint of the Kubo RPC API (note that to expose only that endpoint you will likely need a reverse proxy like nginx or a middleware HTTP server that only passes through requests to that endpoint).

On the client side, you could use the GitHub - ipfs/js-kubo-rpc-client: A client library for the Kubo RPC API to add files explicitly and then you’ll have better control over the whole uploading to IPFS.

In fact, this approach is similar to what running a preload node would be. See this reply on what a preload is: