I'm using FocusLab MasterConfig to set my upload preferences but strangely only the name of the Upload preference gets set by my code. Here is the code in config.master.php

$resources_folder = 'resources';
$resources_path = $base_path . DIRECTORY_SEPARATOR . $resources_folder;
$resources_url  = $base_url . '/' . $resources_folder;

$env_config['upload_preferences'] = array(
    7 => array(
        'name'        => 'Landing Page Banners',
        'server_path' => $resources_path . '/images/banners/landing/',
        'url'         => $images_url  . '/images/banners/landing/'
    8 => array(
        'name'        => 'Home Page Banners',
        'server_path' => $resources_path . '/images/banners/home/',
        'url'         => $images_url  . '/images/banners/home/'

Anyone know why the server_path and url (which are the important values) have no effect on the values shown in the CP?

  • maybe change your 'url' => $images_url . '/images/banners/landing/' to 'url' => $protocol . $_SERVER['HTTP_HOST'] . '/images/banners/landing/' Oct 5, 2016 at 14:58
  • That makes no difference. The url is totally ignored. This worked fine in the old ee version 2 configs. N.B. I am using the ee3 version of masterConfig Oct 10, 2016 at 16:05

1 Answer 1


Did you test out an upload to your directories? It looks like only the name is read from the config variable, while the path / url in the CP will show what's in the database. But in use, reading and uploads to the file directories should use what you have in the Master Config settings -- overriding what's in the database.

  • I've tested my upload directories and they are set correctly. Oct 10, 2016 at 16:03
  • So uploading a file works successfully in the ee control panel? Oct 11, 2016 at 0:22
  • Yes it did. I have 3 projects now with the same issue. Beginning to believe that this is a bug. Do you have this problem with any ee3 projects? Oct 12, 2016 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.