Image upload using Guzzle
I'm struggling to upload images. I'm getting 500 internal server errors so I'm assuming I'm sending malformed requests.
This is all I've managed to come up with:
$itemResponse = $this->lightspeedClient->post('Item/' . $itemID . '/Image.json', [ 'json' => [ "description" => $itemID, "ordering" => 0 ], 'multipart' => [ [ 'name' => "image", 'contents' => $contents, ] ] ]);
Could anyone point me in the right direction? I know my snippet is a little vague. Could anyone post an example of uploading an image using guzzle?