Covert
Member
This error is only thrown if you try to edit the avatar. You just have to move it in any direction and try to save it. If I disable the add-on the exception is no longer thrown.
Storage config:
This is being uploaded to a MinIO server and
Example External URL: https://minio.example.com/bucket/data/avatars/o/1/1234.jpg
Any help is appreicated!
Using DigitalOcean Spaces or Amazon S3 for file storage in XF 2.1 & XF 2.2
XenForo Version Compatibility The download is only compatible with XenForo 2.1 and XenForo 2.2. XenForo 2.3 is supported by following the guide but the download attached to this resource is no longer required. Why this guide? Since XenForo...
xenforo.com
InvalidArgumentException: User does not have an 'o' avatar (data://avatars/o/41/41485.jpg)
Code:
#0 src/XF/Pub/Controller/Account.php(478): XF\Service\User\Avatar->setImageFromExisting()
#1 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Account->actionAvatar(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Account', 'Avatar', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Account), NULL)
#3 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Account), NULL)
#4 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2190): XF\Mvc\Dispatcher->run()
#6 src/XF.php(391): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}
Storage config:
PHP:
$s3 = function () {
return new \Aws\S3\S3Client([
'credentials' => [
'key' => '{AWS_ACCESS_KEY_ID}',
'secret' => '{AWS_SECRET_ACCESS_KEY}'
],
'use_path_style_endpoint' => true,
'region' => '',
'version' => 'latest',
'endpoint' => 'https://{AWS_ENDPOINT}'
]);
};
$config['fsAdapters']['data'] = function () use ($s3) {
return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), '{AWS_BUCKET_NAME}', 'data');
};
$config['fsAdapters']['internal-data'] = function () use ($s3) {
return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), '{AWS_BUCKET_NAME}', 'internal_data');
};
$config['externalDataUrl'] = function ($externalPath, $canonical) {
return 'https://{AWS_CUSTOM_ENDPOINT}/{AWS_BUCKET_NAME}/data/' . $externalPath;
};
This is being uploaded to a MinIO server and
use_path_style_endpoint
is set to true.Example External URL: https://minio.example.com/bucket/data/avatars/o/1/1234.jpg
Any help is appreicated!