Open cirrus-up-cloud opened 6 years ago
please add some examples. I am c# developer and its hard understand how work /add
method
the usage of add does not seem to match the documentation
Tried to upload a file using the /add
API:
curl -XPOST -F 'image=@/opt/some-image.jpg' localhost:8888/add
The request fails and outputs:
{"status": "fail", "error": ["bad request"], "method": "", "result": []}
Is there any specific details that I'm missing?
@dozham, did you find the way to add image?
@the-jojo-jj I did.
Try this:
curl --location --request POST 'localhost:8888/add' --header 'Content-Type: application/x-www-form-urlencoded' --form 'image=@"/path/to/file.png"'
or if you just want to use the filepath
text parameter, replace this line:
--form 'image=@"/path/to/file.png"'
with the following:
--form 'filepath="/path/to/file.png"'
Please, can you add an example for each API? It's quite hard to debug this framework otherwise.