Support the ongoing development of Laravel.io →
posted 8 years ago
Requests
Last updated 1 year ago.
0
Solution

Solved:

$request = $client->createPresignedRequest(...);
// uri is a guzzle uri object
$uri = $request->getUri();
// cast $uri as string
redirect((string)$uri);

You have to explicitly cast the $uri as string. Otherwise you get a Location header for each property of the $uri object, the __toString() method doesn't get called.

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

thiver thiver Joined 11 Dec 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.