Errors

Expected multipart with a file field

Member API single-shot upload requires multipart/form-data including a real file field.

Expected multipart with a file field

POST /api/v1/upload (Member API single-shot upload) could not parse a multipart body with a file.

Why this happens

That route needs multipart/form-data with:

  • file — a real file blob (not a plain string path)
  • agree_tos"1" or "true"

Sending JSON, an empty form, or a malformed multipart body returns: “Expected multipart/form-data with a file field.”

Diagnose and fix

1. Example: curl -F "file=@/path/to/file.bin" -F "agree_tos=1" -H "Authorization: Bearer YOUR_KEY" https://yoursite/api/v1/upload

2. Confirm Mods → Member API / upload API is enabled (toggle.api_upload_mod).

3. Confirm Users & limits → Uploads enabled for that member’s tier.

4. For large files, prefer init → part → complete (/api/v1/upload/init, /part, /complete) instead of single-shot.

Related