cyzyvos
Explore posts from serversCDCloudflare Developers
•Created by cyzyvos on 8/30/2023 in #workers-help
Is it possible to upload a worker script (w/ ESM syntax) using the API?
thanks @baya_78759 and @kiannh, this worked!
7 replies
CDCloudflare Developers
•Created by cyzyvos on 8/30/2023 in #pages-help
Is it possible to upload files via the API?
thanks @cyb3rjak3! that's what I was afraid of. Unfortunately, I'm trying to get this to work in Deno so wrangler is not an option.
just for reference – this is where the magic happens in wrangler, I think: https://github.com/cloudflare/workers-sdk/blob/main/packages/wrangler/src/pages/upload.tsx
3 replies
CDCloudflare Developers
•Created by cyzyvos on 8/30/2023 in #workers-help
Is it possible to upload a worker script (w/ ESM syntax) using the API?
Unfortunately, I don't think that's the case. If I try to deploy my script via the API, I get the following error response:
If I paste the exact same code into the dashboard editor, it works. Also, the API doc explicitly states that only the service worker syntax is supported:
https://developers.cloudflare.com/api/operations/worker-script-upload-worker-module#request-body
7 replies