S3 putFile (PHP) - keeps causing error

I’m trying to process some images and upload to S3 but the S3 connector in PHP doesn’t want to play ball. Whenever I use the putFile step I get the following:

code: 0
file: "/var/www/html/dmxConnectLib/aws/GuzzleHttp/Promise/RejectedPromise.php"
line: 16
message: "method_exists(): Argument #1 ($object_or_class) must be of type object|string, array given"
trace: "#0 /var/www/html/dmxConnectLib/aws/GuzzleHttp/Promise/RejectedPromise.php(16): method_exists(Array, 'then')\n#1 /var/www/html/dmxConnectLib/aws/Aws/Handler/GuzzleV6/GuzzleHandler.php(56): GuzzleHttp\\Promise\\RejectedPromise->__construct(Array)\n#2 /var/www/html/dmxConnectLib/aws/GuzzleHttp/Promise/Promise.php(203): Aws\\Handler\\GuzzleV6\\GuzzleHandler::Aws\\Handler\\GuzzleV6\\{closure}(Object(GuzzleHttp\\Exception\\ClientException))\n#3 /var/www/html/dmxConnectLib/aws/GuzzleHttp/Promise/Promise.php(156): GuzzleHttp\\Promise\\Promise::callHandler(2, Object(GuzzleHttp\\Exception\\ClientException), Array)\n#4 /var/www/html/dmxConnectLib/aws/GuzzleHttp/Promise/TaskQueue.php(47): GuzzleHttp\\Promise\\Promise::GuzzleHttp\\Promise\\{closure}()\n#5 /var/www/html/dmxConnectLib/aws/GuzzleHttp/Handler/CurlMultiHandler.php(118): GuzzleHttp\\Promise\\TaskQueue->run()\n#6 /var/www/html/dmxConnectLib/aws/GuzzleHttp/Handler/CurlMultiHandler.php(145): GuzzleHttp\\Handler\\CurlMultiHandler->tick()\n#7 /var/www/html/dmxConnectLib/aws/GuzzleHttp/Promise/Promise.php(246): GuzzleHttp\\Handler\\CurlMultiHandler->execute(true)\n#8 /var/www/html/dmxConnectLib/aws/GuzzleHttp/Promise/Promise.php(223): GuzzleHttp\\Promise\\Promise->invokeWaitFn()\n#9 /var/www/html/dmxConnectLib/aws/GuzzleHttp/Promise/Promise.php(267): GuzzleHttp\\Promise\\Promise->waitIfPending()\n#10 /var/www/html/dmxConnectLib/aws/GuzzleHttp/Promise/Promise.php(225): GuzzleHttp\\Promise\\Promise->invokeWaitList()\n#11 /var/www/html/dmxConnectLib/aws/GuzzleHttp/Promise/Promise.php(267): GuzzleHttp\\Promise\\Promise->waitIfPending()\n#12 /var/www/html/dmxConnectLib/aws/GuzzleHttp/Promise/Promise.php(225): GuzzleHttp\\Promise\\Promise->invokeWaitList()\n#13 /var/www/html/dmxConnectLib/aws/GuzzleHttp/Promise/Promise.php(62): GuzzleHttp\\Promise\\Promise->waitIfPending()\n#14 /var/www/html/dmxConnectLib/aws/Aws/AwsClientTrait.php(58): GuzzleHttp\\Promise\\Promise->wait()\n#15 /var/www/html/dmxConnectLib/aws/Aws/AwsClientTrait.php(86): Aws\\AwsClient->execute(Object(Aws\\Command))\n#16 /var/www/html/dmxConnectLib/modules/s3.php(150): Aws\\AwsClient->__call('putObject', Array)\n#17 /var/www/html/dmxConnectLib/lib/App.php(195): modules\\s3->putFile(Object(stdClass), 'putFile_copy', NULL)\n#18 /var/www/html/dmxConnectLib/lib/App.php(159): lib\\App->execSteps(Object(stdClass))\n#19 /var/www/html/dmxConnectLib/lib/App.php(127): lib\\App->execSteps(Array)\n#20 /var/www/html/dmxConnectLib/lib/App.php(116): lib\\App->exec(Object(stdClass), false)\n#21 /var/www/html/dmxConnectLib/lib/App.php(94): lib\\App->exec(Object(stdClass))\n#22 /var/www/html/dmxConnect/api/photos/upload_multiple.php(8): lib\\App->define(Object(stdClass))\n#23 {main}"

I can use the same S3 connector to list buckets etc. so the connection details are fine, but can’t get a file to upload. Any ideas if it is something I have got wrong in the setup or a problem with the Server Action step?

Community Page
Last updated: