1

I'm making some changes to an existing ExpressionEngine site which involve moving the system above the web root and using Focus Labs config set up.

Because of the new config set up I had to define the upload directories within my config file.

When I synched the directory within the EE control panel I got error stating

invalid_filename on file foo.jpg
invalid_filename on file bar.jpg
etc.
2

This is caused by not having a trailing slash on the server_path parameter in the upload directory config.

The Focus Labs documentation within the master config doesn't include the slash

$env_config['upload_preferences'] = array(
    1 => array(
        'name'              => 'Uploads',
    'server_path'       => $images_path . '/uploads',
    'url'               => $images_url  . '/uploads/'
),

By adding a trailing slash to the server_path you can fix the error

$env_config['upload_preferences'] = array(
    1 => array(
        'name'              => 'Uploads',
    'server_path'       => $images_path . '/uploads/',
    'url'               => $images_url  . '/uploads/'
),
| improve this answer | |

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