I\'m building an API in PHP. One of the methods is place.new (PUT request). It expects several string fields, and it also expects an image. However I can\'t get it working.
Did you read http://php.net/manual/en/features.file-upload.put-method.php ? Script PUT /put.php
all set up?
Also, what is $image
-- it needs to be a file handler, not a file name.
Ps. Using file_get_contents
will try to load whatever is PUT on the server into memory. Not a good idea. See the linked manual page.