About this endpoint
What it does
Validates an uploaded file by comparing the file’s detected type against the client-provided filename extension and declared MIME type. It returns a JSON object describing the file name, extracted extension, MIME information, detected type, a validity flag, and a human-readable message.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| file | String | Yes | The file to validate. Binary upload. Maximum 100 MB. |
Response
Returns a JSON object with six required top-level string/boolean fields: file_name, extension, mime_type, detected_type, is_valid, and message. is_valid is true when the detected type matches both the extension and the declared MIME; mime_type and detected_type may be null if not provided or not detected.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| file_name | String | Yes | Original filename as provided by the client. |
| extension | String | Yes | Lowercased file extension extracted from file_name. |
| mime_type | String | Yes | MIME type declared by the client (multipart Content-Type field). Null if not provided. |
| detected_type | String | Yes | MIME type detected from the file's binary content. Null if detection failed. |
| is_valid | Boolean | Yes | True when detected type matches both the extension and the declared MIME. |
| message | String | Yes | Human-readable validation result or mismatch explanation. |