Accessing files in a worker

Let's say I have files like this in a worker, the
data.json
file may not always be a JSON file (nothing insane, just some js files or small scripts). I couldn't find any information on how could I access it from the main entrypoint. How could I do this without making a wasteful API request like this: https://developers.cloudflare.com/api/operations/worker-script-download-worker
image.png
Interact with Cloudflare's products and services via the Cloudflare API
Was this page helpful?