dsys / match

:crystal_ball: Scalable reverse image search built on Kubernetes and Elasticsearch
Other
1.24k stars 150 forks source link

Add examples #24

Open cirrus-up-cloud opened 6 years ago

cirrus-up-cloud commented 6 years ago

Please, can you add an example for each API? It's quite hard to debug this framework otherwise.

Radzhab commented 6 years ago

please add some examples. I am c# developer and its hard understand how work /add method

ajlovell commented 5 years ago

the usage of add does not seem to match the documentation

dozham commented 4 years ago

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?

the-jojo-jj commented 3 years ago

@dozham, did you find the way to add image?

dozham commented 3 years ago

@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"'