XF 2.X : BUNNYCDN , API, and StorageZONE

zeus1971

Collaborate
Collaborate
Registered
Joined
Apr 18, 2020
Messages
310
Points
73

Reputation:

It seems that with XF 2.0, 2.1, 2.2 we can use external storage, with a provider (if the provider is prepared to use API or how they call it...)
So, reading this links, it seems that it's possible with BunnyCDN too :

https://xenforo.com/community/resources/using-digitalocean-spaces-or-amazon-s3-for-file-storage-in-xf-2-x.6805/

https://github.com/BunnyWay/BunnyCDN.PHP.Storage

Now, can someone be so kind to tell me what I have to put in my config.php to point my DATA and INTERNAL_DATA to my Bunny StorageZone ? :D
BunnySide it's ok , no problem

Sorry but I'm not a DEV
 

zeus1971

Collaborate
Collaborate
Registered
Joined
Apr 18, 2020
Messages
310
Points
73

Reputation:

I mean , I had to configure with my credencial the PHP file donwloaded by GitHub, and than put this 2 code in config.php ?
Is it right ?

Example :

PHP:
$config['externalDataUrl'] = function($externalPath, $canonical)
{
return 'https://xftest.s3.eu-west-2.amazonaws.com/data/' . $externalPath;
};


PHP:
$config['fsAdapters']['internal-data'] = function() use($s3)
{
return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'xftest', 'internal_data');
};
 

zeus1971

Collaborate
Collaborate
Registered
Joined
Apr 18, 2020
Messages
310
Points
73

Reputation:

Ohh man...I don't know what to put in the first and last code. It refer to S3 and no idea what to put here...
"
return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'xftest', 'data');

"

1600412493508.png
 

Soft4Win

Developer
Staff member
Moderator
Collaborate
Registered
Joined
Apr 27, 2019
Messages
370
Points
103

Reputation:

@zeus1971 You won't be able to achieve it without some custom development i believe, you must hire a developer who is experienced in cdn and stuffs.
 
Top