I can't upload an image

I’m trying to create request:

curl -X GET \
  https://api.thecatapi.com/v1/images/upload \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Length: 87182' \
  -H 'Host: api.thecatapi.com' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F file=@/Users/me/Downloads/9ccXTANkb.jpg

and response is

{
    "message": "Couldn't find an image matching the passed 'id' of upload",
    "status": 400,
    "level": "info"
}

I’m not sure what kind of id is missing in this error: Couldn't find an image matching the passed 'id' of upload

You’re performing a GET request. Upload will need to be a POST.

1 Like

Geez, I’m ~20 years in web development and end up with such a stupid mistake :sweat:

Thank you very much!

1 Like