0

Here is the curl command:

curl -X POST \
  -H "Authorization: Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d @- https://api.clarifai.com/v2/models/aaa03c23b3724a16a56b629203edc62c/outputs << FILEIN
  {
    "inputs": [
      {
        "data": {
          "image": {
            "base64": "$(base64 /home/user/image.png)"
          }
        }
      }
    ]
  }
FILEIN

The question is how can I attach the file on c libcurl code? Many Thanks, Ben

Ben Goz
  • 13
  • 4
  • Welcome to stackoverflow.com. Please take some time to read the [help pages](https://stackoverflow.com/help), especially the sections named ["What topics can I ask about here?"](https://stackoverflow.com/help/on-topic) and ["What types of questions should I avoid asking?"](https://stackoverflow.com/help/dont-ask). Also please take the [tour](https://stackoverflow.com/tour) and read about [how to ask good questions](https://stackoverflow.com/help/how-to-ask). Lastly please learn how to create a [Minimal, Complete, and Verifiable Example](https://stackoverflow.com/help/mcve). – cschneid Oct 22 '17 at 15:48
  • what problem are you having? Have you read the manual for CURL? What part of the manual are you having a problem with? Could you post a link to the manual, so we can follow along with your discussion of what problem you are having? – user3629249 Oct 23 '17 at 19:32
  • I don't know what functions to use in libcurl that replaces the FILEIN along with the json array. – Ben Goz Oct 25 '17 at 13:34

0 Answers0