• Hi there,

    We’re just in the setup process of this awesome plugin with GCS (Google Cloud Storage) and facing the issue with the following error message:

    “Given Key File Path is invalid or could not be accessed.”

    We did created the API credentials in Google Cloud Platform (.json-File) and then placed it inside the WP directory under: /wp-content/folder/key-file.json”

    In WP config we then placed this code:

    /** Google Cloud Storage (Offload) */
    define( 'AS3CF_SETTINGS', serialize( array(
        'provider' => 'gcp',
        'key-file-path' => '/wp-content/folder/key-file.json',
    ) ) );

    Is there anything we might have done wrong here?

    Many thanks for your feedback.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter raffi_s

    (@raffi_s)

    We were able to sort it out now. Could we kindly ask for another question.

    When we are on the next step now, we need to create a new bucket. Whenever we try to do so, we do receive this error:

    {"error":{"code":403,"message":"xxx@xxx.iam.gserviceaccount.com does not have storage.buckets.create access to the Google Cloud project.","errors":[{"message":"xxx@xxx.iam.gserviceaccount.com does not have storage.buckets.create access to the Google Cloud project.","domain":"global","reason":"forbidden"}]}}

    Thanks so much for your help 🙂

    Plugin Author Delicious Brains

    (@deliciousbrains)

    Did you fix the initial problem by using a full absolute file path in the ‘key-file-path’?

    Does the GCP user have Storage Admin access?

    https://deliciousbrains.com/wp-offload-media/doc/google-cloud-storage-quick-start-guide/#service-account-key-file

    -IJ

    Thread Starter raffi_s

    (@raffi_s)

    Thank you so much for your swift reply. Yes, we were able to solve the first issue with the file-path, thanks!

    Somhow the process in GCP looks different on our side than in the tutorial screenshots.

    If we create a user, we followed these steps:

    1.) https://ibb.co/Km2ywXZ
    2.) https://ibb.co/NW5W7G3
    3.) https://ibb.co/8sgg110

    Afterwards we had to open this user and create the JSON file here:
    https://ibb.co/KLS4d4M

    Not sure if we might have done something wrong?

    Many thanks & have a great day

    Thread Starter raffi_s

    (@raffi_s)

    Awesome, it works now after we adjusted the access permission rights.

    One really last question: We’ve set the “Copy Files to Bucket” > “ON”. We now uploaded a random JPG via the Media Library in WordPress but can’t see the file uploaded to GCP yet. Is there a cronjob/batch process running or do you know why an uploaded file might not be available on GCP yet?

    Many thanks

    Plugin Author Delicious Brains

    (@deliciousbrains)

    Glad you got the permissions sorted.

    > Is there a cronjob/batch process running or do you know why an uploaded file might not be available on GCP yet?

    No, for Lite as soon as you add the image to the Media Library it should be offloaded to the bucket.

    If the item has been offloaded it’ll say so when you click into the item from the Media Library, there’s extra offload info on the right hand side.

    You should probably check your debug.log etc for any error messages, and double check the uploaded image has at least one of the expected thumbnails generated.

    -IJ

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Google Cloud Storage: Key File Path question’ is closed to new replies.