0

When i have upload the image using below settings that will give me an error The error message was: "Error uploading the file: The file system path "/public_html/src/assets/images/" set for this source does not exist.

general.php file

<?php

 $siteUrl = array(
    'en_gb' => 'https://www.ancamotion.com/',
    'de' => 'https://www.ancamotion.de/',
    'zh_cn' => 'https://www.ancamotion.cn/',
    'zh_tw' => 'https://www.ancamotion.com.tw/',
);

return array(

    '*' => array(
        'devMode' => false,
        'extraAllowedFileExtensions' => 'exe, xml',
        'maxUploadFileSize' => 67108864,
        'omitScriptNameInUrls' => true,
        'timezone' => 'Australia/Melbourne',
        'setPasswordPath' => array(
            'en' => 'securezone/resetpasswordform.html',
                 'de' => 'securezone/resetpasswordform.html',
                  'cn' => 'securezone/resetpasswordform.html',
        ),
        'setPasswordSuccessPath' => array(
            'en' => 'password/thanks-reset.html',
                'de' => 'password/thanks-reset.html',
                'cn' => 'password/thanks-reset.html',
        ),
    ),

   'ancamotion.com' => array(
        'siteUrl' => $siteUrl,
        'environmentVariables' => array(
            'basePath' => '/public_html/',
            'baseUrl'  => 'https://www.ancamotion.com/',
        ),
    ),
   'ancamotion.de' => array(
        'siteUrl' => $siteUrl,
        'environmentVariables' => array(
            'basePath' => '/public_de/',
            'baseUrl'  => 'https://www.ancamotion.de/',
        ),
    ),
   'ancamotion.cn' => array(
        'siteUrl' => $siteUrl,
        'environmentVariables' => array(
            'basePath' => '/public_cn/',
            'baseUrl'  => 'https://www.ancamotion.cn/',
        ),
    ),
   'ancamotion.com.tw' => array(
        'siteUrl' => $siteUrl,
        'environmentVariables' => array(
            'basePath' => '/public_tw/',
            'baseUrl'  => 'https://www.ancamotion.com.tw/',
        ),
    ),

);

my settings from website admin Assets are

File System Path --> {basePath}src/assets/images/

URL --> {baseUrl}src/assets/images/

Can anyone help me with this?

Thank You in advanced.

2

That error message means your basePath is incorrect and Craft can't find the directory you're referring to.

From your settings, it looks like Craft would try to upload images to /public_html/src/assets/images/. If that's correct, try using / or nothing instead of your current basePath. And make sure the folder exists on the server.

| improve this answer | |
  • thanks, and i have tried this in my general.php but didnt work, but i can see my base url is right like, for english website -- ancamotion.com/src/assets/images/(imagename), for my german website ancamotion.de/src/assets/images/(imagename), but here image is not appear is because basepath is wrong and didnt upload the image in --> public_de/src/assets/images/. same thing happen with other two domains as well only english is working fine, any more thought? thank you in advance. addy – addy Sep 20 '17 at 22:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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