Errors

Expected multipart form-data

An upload API got a body that is not multipart/form-data (wrong Content-Type or client).

Expected multipart form-data

The endpoint expected a multipart/form-data request, but the body was something else (JSON, raw bytes, or a missing/wrong Content-Type).

Why this happens

Many image/logo routes (admin branding, design assets, payment/partner logos, member account branding) only accept multipart forms with a file field. Curl with -d / JSON, or a script that posts raw bytes, triggers this 400.

This is not the normal browser chunked file upload (those use JSON init + raw part streams). You usually see it when calling upload APIs by hand or with a broken client.

Diagnose and fix

1. Use the UI file picker for logos and design images instead of a custom script when possible.

2. For API/curl: send multipart, e.g. curl -F "file=@/path/to/image.png" … (field name must match what that route expects — often file or image).

3. Do not set Content-Type: application/json on these routes.

4. Member branding: Account branding in the member area; check size limits if the next error is about dimensions/bytes.

Related