You can remove them from the bucket if you’re confident they’re the right ones. Or you can leave them and it’s probably fine other than them taking up space. The bigger deal would be modifying or deleting attachments on the test installation.
test-forum
. I then copied all the files from my forum
bucket to my test-forum
bucket.config.php
anywhere it said 'forum', i changed it to 'test-forum'.test-forum
any more....An exception occurred: [InvalidArgumentException] Must pass valid resource in in src/XF/Http/ResponseStream.php on line 18
[LIST=1]
[*]XF\Http\ResponseStream->__construct() in src/XF/Http/Response.php at line 262
[*]XF\Http\Response->responseStream() in src/XF/Pub/View/Attachment/View.php at line 28
[*]XF\Pub\View\Attachment\View->renderRaw() in src/XF/Mvc/Renderer/AbstractRenderer.php at line 92
[*]XF\Mvc\Renderer\AbstractRenderer->renderViewObject() in src/XF/Mvc/Renderer/Raw.php at line 39
[*]XF\Mvc\Renderer\Raw->renderView() in src/XF/Mvc/Dispatcher.php at line 471
[*]XF\Mvc\Dispatcher->renderView() in src/XF/Mvc/Dispatcher.php at line 453
[*]XF\Mvc\Dispatcher->renderReply() in src/XF/Mvc/Dispatcher.php at line 412
[*]XF\Mvc\Dispatcher->render() in src/XF/Mvc/Dispatcher.php at line 66
[*]XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2826
[*]XF\App->run() in src/XF.php at line 806
[*]XF::runApp() in index.php at line 23
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 src/XF/Http/Response.php(262): XF\Http\ResponseStream->__construct(false, 459720)
#1 src/XF/Pub/View/Attachment/View.php(28): XF\Http\Response->responseStream(false, 459720)
#2 src/XF/Mvc/Renderer/AbstractRenderer.php(92): XF\Pub\View\Attachment\View->renderRaw()
#3 src/XF/Mvc/Renderer/Raw.php(39): XF\Mvc\Renderer\AbstractRenderer->renderViewObject('XF:Attachment\\V...', '', Array)
#4 src/XF/Mvc/Dispatcher.php(471): XF\Mvc\Renderer\Raw->renderView('XF:Attachment\\V...', '', Array)
#5 src/XF/Mvc/Dispatcher.php(453): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Raw), Object(XF\Mvc\Reply\View))
#6 src/XF/Mvc/Dispatcher.php(412): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Raw), Object(XF\Mvc\Reply\View))
#7 src/XF/Mvc/Dispatcher.php(66): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'raw')
#8 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#9 src/XF.php(806): XF\App->run()
#10 index.php(23): XF::runApp('XF\\Pub\\App')
#11 {main}
$s3 = function()
{
return new \Aws\S3\S3Client([
'credentials' => [
'key' => '',
'secret' => ''
],
'region' => 'us-east-1',
'version' => 'latest',
'endpoint' => 'https://s3.us-east-1.amazonaws.com'
]);
};
$config['fsAdapters']['data'] = function() use($s3)
{
return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'cdn.totalfreedom.tf', 'data');
};
$config['externalDataUrl'] = function($externalPath, $canonical)
{
return 'https://cdn.totalfreedom.tf/data/' . $externalPath;
};
$config['fsAdapters']['internal-data'] = function() use($s3)
{
return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'cdn.totalfreedom.tf', 'internal_data');
};
It did not like that a bit and choked with a bunch of red error message lines. Something having to do with the location of flags for a Snog addon.
I'm having the same issue. This tutorial works fine until you start putting the internal_data code in. You do need ACLs. You should go in and make your existing data publicly accessible and XenForo will use ACLs to automatically make future uploads public. I'm super irritated my reply was ignored and this tutorial didn't mention you need ACLs.Just starting using S3 buckets for data and internal_data with Xenforo.
I had to enable ACLs which is not recommended anymore, but more importantly, I found out that it is trying to enable public access for files in internal_data, which sounds counter intuitive at least to me:
Is it a an expected behaviour to have public files from internal_data?
#PHP:
#
#$s3 = function()
#{
# return new \Aws\S3\S3Client([
# 'credentials' => [
# 'key' => 'XXXX',
# 'secret' => 'XXXX'
# ],
# 'region' => 'tor1',
# 'version' => 'latest',
# 'endpoint' => 'https://tor1.digitaloceanspaces.com'
# ]);
#};
#PHP:
#
#$config['fsAdapters']['data'] = function() use($s3)
#{
# return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'xen-XXX', 'data'>
#};
#PHP:
#
#$config['externalDataUrl'] = function($externalPath, $canonical)
#{
# return 'https://xen-XXX.tor1.digitaloceanspaces.com/data/' . $externalPath;
#};
That was me not having Putty's window wide enough and it truncated my copying. The line in my config is actually as you say.Specifically this line
Code:return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'xen-XXX', 'data'>
Should be
Code:return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'xen-XXX', 'data');
# return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'xen-XXX', 'data');
We use essential cookies to make this site work, and optional cookies to enhance your experience.