I'm trying to craft a curl request to upload an image to the user_picture field on a user entity using json:api.
The documentation is, umm, minimal, but I've used it as a starting point and I have this:
curl -s -X POST -b cookie.txt \
--header "Accept: application/vnd.api+json" \
--header "Content-type: application/octet-stream" \
--header "X-CSRF-Token: $TOKEN" \
--header "Content-Disposition: file: filename=test.jpg" \
--data-binary "@test.jpg" \
http://localhost/jsonapi/user/user/$UUID/user_picture
The response for this is "No route found that matches \"Content-Type: application/x-www-form-urlencoded\"
".
What am I doing wrong?