Sending files using curl

The easiest way to send files to MobileEngine directly from the command line is to use the curl tool. Here’s an example of how to add an image.

curl https://mobileengine.tineye.com/<company>/rest/add/   \
	-F "image=@1.jpg"                                  \
	-F "filepath=path/to/file.jpg"

The first -F option (image=@1.jpg) points to the file on your local machine. The second -F option (filepath=path/to/file.jpg) is the file path that you would like to give to the image on the MobileEngine server. If filepath is omitted, the file’s local path will be used.

The file path can be any arbitrary identifier you like for the image, and it does not need to end with .jpg or any other file extension. It is important that the file paths be unique because images with the same path will overwrite each other.

You can find more information about requests in the MobileEngine documentation.