Ghirensics / ghiro

Automated image forensics tool
http://getghiro.org
479 stars 96 forks source link

500 Server Error on images/new in api #14

Closed solasdev closed 8 years ago

solasdev commented 8 years ago

As seen below calling api to create new case works fine but api complains when I try new image. For the image param iv'e tried using both a url and a path to an image on the server from which i'm running the curl request. Tried inside quotes and with no quotes.

Maybe you can spot something here?

Retina-MacBook-Pro:.ssh newuser$ curl -kis -F name=foo2 -F description=bar2 -F api_key=52............9a http://52.49.255.176/api/cases/new HTTP/1.1 100 Continue

HTTP/1.1 200 OK Date: Wed, 30 Mar 2016 09:10:32 GMT Server: Apache/2.4.7 (Ubuntu) Content-Length: 9 Content-Type: application/json

{"id": 4}Retina-MacBook-Pro:.ssh newuser$ Retina-MacBook-Pro:.ssh newuser$ curl -kis -F case_id=4 -F image=https://upload.wikimedia.org/wikipedia/commons/1/1e/Stonehenge.jpg -F api_key=52...........9a http://52.49.255.176/api/images/new HTTP/1.1 100 Continue

HTTP/1.1 500 INTERNAL SERVER ERROR Date: Wed, 30 Mar 2016 09:11:51 GMT Server: Apache/2.4.7 (Ubuntu) Content-Length: 27 Connection: close Content-Type: text/html

Server Error (500)

Retina-MacBook-Pro:.ssh newuser$
solasdev commented 8 years ago

Never mind was failing to add the @ to the image that curl requires.

jekil commented 8 years ago

Don't worry, just a comment: the image parameter accepts only file names (or paths) not URLs.