In these lines do I have to replace anything?I've worked up a tutorial to combine my Attachment Improvements add-on with the with X-Accel-Redirect enabled and using S3 support; 2.0.4 - X-Accel-Redirect with AWS/S3 support
Anyone? Do I have to edit that part?Do I need to edit the "internal_data" line or leave it alone?
If I have to edit it where can I get the line for it or location?
//public data
$config['fsAdapters']['data'] = function() use($s3)
{
return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'mybucket', 'data');
};
//private data
$config['fsAdapters']['internal-data'] = function() use($s3)
{
return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'mybucket', 'pdata');
};
Thanks.I recommend it. I made 2 folders in 1 bucket on s3, one for public (data) and one for private (pdata)
Code://public data $config['fsAdapters']['data'] = function() use($s3) { return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'mybucket', 'data'); }; //private data $config['fsAdapters']['internal-data'] = function() use($s3) { return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'mybucket', 'pdata'); };
Can someone edit it for me? I would even pay for it if needed....Thanks.
So what I need to replace is
"internal_data" to my DO's url name so if my url is https://EXAMPLE.fra1.digitaloceanspaces.com /
then it will be "example"
I also need to edit the "return" part?
Unfortunatelly Im not an IT guy, I can only replace parts if its in a tutoral or the description specify it....
Also what's the difference between public and private data?I recommend it. I made 2 folders in 1 bucket on s3, one for public (data) and one for private (pdata)
Code://public data $config['fsAdapters']['data'] = function() use($s3) { return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'mybucket', 'data'); }; //private data $config['fsAdapters']['internal-data'] = function() use($s3) { return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'mybucket', 'pdata'); };
Sorry, i never used DO so i can't help there. I assume it would work that way if EXAMPLE is your bucket's name.Thanks.
So what I need to replace is
"internal_data" to my DO's url name so if my url is https://EXAMPLE.fra1.digitaloceanspaces.com /
then it will be "example"
I also need to edit the "return" part?
Unfortunatelly Im not an IT guy, I can only replace parts if its in a tutoral or the description specify it....
return 'https://bucketname.sgp1.cdn.digitaloceanspaces.com/data/' . $externalPath;
return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'bucketname', 'internal_data');
I did this tutoral:Sorry, i never used DO so i can't help there. I assume it would work that way if EXAMPLE is your bucket's name.
can you set
https://EXAMPLE.fra1.digitaloceanspaces.com/data
and
https://EXAMPLE.fra1.digitaloceanspaces.com/pdata
folders in the EXAMPLE space?
Try it quickly - upload an avatar and see that it's in the DO space. if it's not, revert your config file.
Remember, the old stuff won't move automatically - you'll have to ftp or use an s3cmd type command line tool to do the asset migration. Setting the paths only updates sourcing locations and go-forward store location. So, you need to get the local stuff to the droplet.
i just checked my old config file from when i was using do spaces. i have the same format:
return 'https://bucketname.sgp1.cdn.digitaloceanspaces.com/data/' . $externalPath;
this is for externalDataUrl.
for internal-data, it shows:
return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'bucketname', 'internal_data');
Thanks.Files are deleted through a cron job so periodically and not immediately iirc.
Which part of it is older?that looks correct.
I think some of the confusion is that you are seeing 2.0 instructions/older version mixed in the thread. It was streamlined quite a bit in the latest version.
if you're on apache, you won't have nginx config.... that's a competing webserver that some people use instead of apache. It doesn't support htaccess so those rules need to be added to it's config file.
This thread started before xf2.2 was out, and even the first version of this mod... so, the thread has a lot of old/outdated info in the first several pages before newer releases came out so don't confuse the old instructions with modern ones
We use essential cookies to make this site work, and optional cookies to enhance your experience.