I'm trying to transform a postman request into Guzzle. Postman works fine, Guzzle is a nightmare. Probably just a minor detail but I can't seem to figure it out. Any help is appreciated.
The postman request:
My request so far (not working)
$response = $this->client->post( '/api/whitelabel/images', [ 'headers' => [ 'Accept' => 'application/json', 'Content-Type' => 'multipart/form-data', 'Authorization' => 'Bearer '. $userToken, ], 'multipart' => [ [ 'name' => 'myFile', 'contents' => file_get_contents($media->getPath()), ], ], ], );
Path to file is correct