my prefect server setup prefect-metrics.waow.tech
python orchestration
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: use multipart form data for CF Pages deploy API

httpx data= sends url-encoded, but CF Pages expects multipart/form-data.
Use files= with (None, value) tuples to send proper -F style fields.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+6 -2
+6 -2
flows/atlas.py
··· 82 82 83 83 logger.info(f"deploying {len(manifest)} files") 84 84 85 - # create deployment (manifest must be a multipart form field, not JSON body) 85 + # create deployment — CF expects multipart/form-data (-F fields in curl) 86 + # httpx: files={(name, (None, value))} sends multipart form fields 86 87 resp = httpx.post( 87 88 f"{CF_API}/accounts/{CF_ACCOUNT_ID}/pages/projects/{CF_PROJECT}/deployments", 88 89 headers=headers, 89 - data={"manifest": json.dumps(manifest), "branch": "main"}, 90 + files={ 91 + "manifest": (None, json.dumps(manifest), "application/json"), 92 + "branch": (None, "main"), 93 + }, 90 94 timeout=60, 91 95 ) 92 96 if not resp.is_success: