[bd] Data Storage

xF1 Add-on [bd] Data Storage 1.1.2

No permission to download
[bd] Data Storage
Store data in remote servers.

[FEATURES]
All data which is currently stored in external data directory (/data) will be processed by this add-on and pushed to remote server. By default, XenForo saves avatars and attachment thumbnails in here. That means with this add-on, you can serve avatar from Amazon S3! It's much easier to run a cluster of web servers now.

1. Store data with Amazon S3
2. Store data in remote server via FTP


[INSTALLATION]
1. Upload files and directories inside `upload` to XenForo's root directory. Select "Merge" for everything if you are asked
2. Import the .xml file using XenForo add-on importer
3. Edit config.php (see below)
4. Upload existing files in external data directory (/data) to your remote server before enable the add-on.

[CONFIG.PHP with AMAZON S3]
If you want to use Amazon S3, add this to config.php

Code:
 $config['bdDataStorage'] = array(
	array(
		'type' => 's3',
		'key' => '<paste your key here>',
		'secret' => '<paste your secret here>',
		'bucket' => '<enter bucket name here>',
		// 'region' => 'us-east-1',
		// 'url' => '',
		// 'acl' => 'public',
	),
);


If you use any a different region from US Standard, you have to uncomment `region` line (remove the slashes) and use one of the values below:
  • us-west-1 = Northen California
  • us-west-2 = Oregon
  • eu-west-1 = Ireland
  • ap-southeast-1 = Singapore
  • ap-northeast-1 = Tokyo
  • ap-southeast-2 = Sydney
  • sa-east-1 = Sao Paulo

If you don't want to use s3.amazonaws.com urls (using your domain or using CDN services), you can enter the root address for `url`, make sure you uncomment the line.

If you use CloudFront and want to restrict access to the file (only available via CloudFront), you can change the line `acl` to "private", make sure you uncomment it first.

A complete Amazon S3 config.php example:

Code:
 $config['bdDataStorage'] = array(
	array(
		'type' => 's3',
		'key' => 'BROIQ53MQHOLEPAKLQCE',
		'secret' => 'p29m83MpQkO9+veIn3i9ENXQpN0ceqn4nr/nPXbq',
		'bucket' => 's3.xfrocks.com',
		'region' => 'ap-southeast-1',
		'url' => 'http://s3.xfrocks.com',
		// 'acl' => 'public',
	),
);

[CONFIG.PHP with FTP]
If you want to use Amazon S3, add this to config.php

Code:
 $config['bdDataStorage'] = array(
	array(
		'type' => 'ftp',
		'host' => '<enter FTP host here>',
		'username' => '<enter your username here>',
		'password' => '<enter your password here>',
		'path' => '<enter FTP upload path here>',
		'url' => '<enter URL to upload path here>',
		// 'port' => 21,
		// 'passive' => true,
	),
);


It's important to set `path` and `url` correctly.

If your FTP server use some port other than 21, uncomment the line (remove the slashes) and put the port number there.

If it is required to connect to your FTP server with passive mode one, uncomment the `passive` line. If you are unsure, you can test with the line and without it to find a mode that works.

A complete FTP config.php example:

Code:
 $config['bdDataStorage'] = array(
	array(
		'type' => 'ftp',
		'host' => '192.168.1.2',
		'username' => 'xfrocks',
		'password' => 'rMtd4vSt',
		'path' => '/domains/ftp.xfrocks.com/public_html',
		'url' => 'http://ftp.xfrocks.com',
		'port' => 12121,
		'passive' => true,
	),
);
  • Like
Reactions: linuxy
Author
Admin
Size
10.7 KB
Extension
zip
Downloads
9
Views
1,282
First release
Last update

More resources from Admin

Similar resources

Brivium - Inbox Storage Limit AnimeHaxor
This add-on will add a limit on how many messages users inboxes can contain.
0.00 star(s) 0 ratings
Downloads
7
Updated