▲ 3 r/CloudFlare
X [ERROR] Failed to upload files. Please try again. POST /pages/assets/upload -> 502 Bad Gateway Received a malformed response from the API
Hey everyone,
I’m trying to deploy my Cloudflare Pages project using Wrangler but the upload keeps failing near the end.
Command:
npx wrangler pages deploy . --project-name itliq
Error:
X [ERROR] Failed to upload files. Please try again.
POST /pages/assets/upload -> 502 Bad Gateway
Received a malformed response from the API
It usually stops around:
Uploading... (297/303)
I also got:
fetch failed
A fetch request failed, likely due to a connectivity issue.
Things I already tried:
- Retrying multiple times
- Using
.in deploy command - Restarting terminal
- Checking internet connection
Wrangler version:
4.90.1
Has anyone experienced this before?
Is this usually a Cloudflare issue or could it be caused by specific files in the project?
Would really appreciate any help 🙏
u/Final-Piano3753 — 22 hours ago