I want to create/update Cloudflare Pages project from a ZIP file (or file by file) with static content using REST API without Git/Wrangler.
I want to migrate my solution from Netlify to Cloudflare pages if this is possible.
I want to create/update Cloudflare Pages project from a ZIP file (or file by file) with static content using REST API without Git/Wrangler.
I want to migrate my solution from Netlify to Cloudflare pages if this is possible.
Unfortunately, Cloudflare Pages doesn’t offer a documented REST API for direct file uploads.
The best reference will be wrangler’s source: https://github.com/cloudflare/workers-sdk/blob/main/packages/wrangler/src/pages/upload.tsx, but keep in mind that as with any undocumented APIs, there’s no guarantee of stability or backwards compatibility, etc.
Thank you for your response.
Do you have any plans for the future?
As I understand if this API changed then all CI/CD integrations also must be changed.
Out of interest, why not just use wrangler? It’s much easier to run wrangler at a folder than figure out the API, correctly encode the content, correctly hash it all and send it up.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.