Hello friends
I need to upload images to Amazon S3, Yii 2 has a way to do it? I tried use the Amazon SDK, I created a code php without use Yii2 to test and worked very well, but when I try use Yii2 I have this error message:
PHP Fatal Error – yii\base\ErrorException
Class ‘Aws\Handler\GuzzleV6\GuzzleHandler’ not found
in /var/lib/openshift/564b156299fc7771a9000001/app-root/runtime/repo/php/admapps/web/libs/amazon/vendor/aws/aws-sdk-php/src/functions.php at line 274
265266267268269270271272273274275276277278279280281282283 *
*/
function default_http_handler()
{
$version = (string) ClientInterface::VERSION;
if ($version[0] === '5') {
return new \Aws\Handler\GuzzleV5\GuzzleHandler();
} elseif ($version[0] === '6') {
return new \Aws\Handler\GuzzleV6\GuzzleHandler();
} else {
throw new \RuntimeException('Unknown Guzzle version: ' . $version);
}
}
jacmoe
(Jacob Moen)
December 4, 2015, 12:50am
2