curl 'http://127.0.0.1:8765/upload' \
  -F 'document=@report.txt;type=text/plain' \
  -F 'metadata={"mode":"strict"};type=application/json'

Run from the examples directory with the demo server running in another terminal.
Expected: HTTP 200 and JSON with document (text/plain, 65 bytes) and metadata (application/json, 17 bytes).
Change only metadata's type to text/plain for the expected 415 example.
