0

I've created a Google Cloud Storage Bucket and enabled what I believe to be the right place for the Secret and Access ID - however, I'm getting the following error whenever I try to save and the location doesn't appear in my assets folder for view:

A PHP Error was encountered Severity: Notice Message: Undefined property: stdClass::$body Filename: lib/Assets_GC.php Line Number: 1993

I can't actually find any instructions on how to configure/setup google cloud hosting, so I'm a little stuck as to whether I've done the right thing or not.

0

I'm not sure what the error is being caused by. P&T may have some more info for you.

In the meantime, you might try using the config overrides for Assets to see if that works instead. This if you're using a master config of some sort. If no master config then disregard this answer.

You can setup Google Cloud Storage via a System Configuration Override using assets_source_settings. This is similar to EE's file upload_preference (v3)(v2). So, if you had two locations to setup, for Focus Lab Master Config on EE2, it would look something like this:

$env_config['assets_source_settings'] = array(
    1 => array(
        'access_key_id'     => 'your_id',
        'secret_access_key' => 'your_access_key',
        'bucket'            => 'your_bucket',
        'url_prefix'        => 'your_url_prefix',
        'subfolder'         => 'your_subfolder',
    ),
    2 => array(
        'access_key_id'     => 'your_id',
        'secret_access_key' => 'your_access_key',
        'bucket'            => 'your_bucket',
        'url_prefix'        => 'your_url_prefix',
        'subfolder'         => 'your_subfolder',
    )
);

Note: I'm not sure you can setup a source without doing it in the CP first, however, could be worth a try.

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.