RM 1.0 Change the path to folder where downloads are stored

We currently use multiple disks on our server, and we would like to store the downloads (quite large files sometimes) in a folder on a different disk.

Is this possible?
 
How do I change the internal data path from the default of internal_data?
Edit the library/config.php file and add the following:
PHP:
$config['internalDataPath'] = 'new_internal_data_path';
Change the path to suit. Note that the path is relative to the installation path.


How do I change the external data path from the default of data?
Edit the library/config.php file and add the following:
PHP:
$config['externalDataPath'] = 'new_external_data_path';
$config['externalDataUrl'] = 'new_external_data_url';
Change the paths to suit. Note that the path is a file path (it can be relative to the installation path) and the URL is how the data will be loaded by users. These values need to point to corresponding locations.


http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-180456
 
I have an attachments folder on the data folder, and another in the internal_data folder.

If I add the lines you suggested to the config, the resources manager works, but the normal forum attachments are broken links.
 
Ok I've moved both data and internal_data folders to the secondary disk.

This is my config:

$config['internalDataPath'] = '/mnt/1TBdrive/internal_data';

$config['externalDataPath'] = '/mnt/1TBdrive/data';
$config['externalDataUrl'] = '???';

While the paths seem to work ok, the externalDataUrl seems to be not good as I can't see avatars etc.

Does it have to be a folder reachable from the web?
 
Yes, the data folder needs to be reachable from the web.

Hi Mike. I am doing the same thing here for a client. I just want to confirm,

I have copied the data and internal_data folders to a separately mounted storage disk. So if I don't change the config path variables, can I just create two symbolic links inside the xenforo directory for both the data and internal_data folders and be done?

OR... is it better to change the config['internalDataPath'] to the actual path and use symbolic link for $config['externalDataPath'] ?
 
A symlink should work, but in terms of the paths, you might as well just use the real paths -- there's no real advantage to using the symlink. Note that there's an external data path and URL. The URL is what'll be used. You could expose your external mount with whatever URL you want or you can use a symlink to make it accessible at the default URL.
 
Top Bottom