-
-
Save bjornbjorn/3801466 to your computer and use it in GitHub Desktop.
$env_config['upload_preferences'] = array( | |
1 => array( | |
'name' => 'Uploads', | |
'server_path' => APPPATH."..\\..\\webroot\\uploads\\", | |
'url' => $env_config['base_url'].'uploads/' | |
), | |
); |
$env_config['upload_preferences'] = array(
1 => array(
'name' => 'Default Uploads',
'server_path' => $images_path . '/uploads/',
'url' => $images_url . '/uploads/'
),
2 => array(
'name' => 'Second Folder',
'server_path' => $images_path . '/another_one/',
'url' => $images_url . '/another_one/'
),
2 => array(
'name' => 'Third Folder',
'server_path' => $images_path . '/third_one/',
'url' => $images_url . '/third_one/'
)
);
You also need to create the actual folder itself in the location you set. If you add a third item don't forget to add a trailing comma to the end of the second item. The numbers ie. 1,2,3 should coincide with the ID of the file upload preferences in the CP so, theoretically they could be 3, 4 and 5 or anything for that matter as they are dependent on the ID as mentioned. I recommend adding a trailing slash / to the end of the server_path, something which wasn't done in the example of the master config.
FYI - you need to create the upload location first in the CP though