auroraextensions/googlecloudstorage 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

auroraextensions/googlecloudstorage

Composer 安装命令:

composer require auroraextensions/googlecloudstorage

包简介

Google Cloud Storage integration for Magento.

README 文档

README

Description

Use Google Cloud Storage to store media assets in Magento.

Installation

We highly recommend installing via Composer for package management.

composer require auroraextensions/googlecloudstorage

Configuration

Once installed, update the environment configuration file. See env.php.sample for an example. The following information should be readily available:

  1. Google Cloud project ID
  2. Path to the Google Cloud service account JSON key file. See Service Account for more details.
  3. Google Cloud Storage bucket name
  4. Google Cloud Storage bucket region (if applicable)

Next, enable the module with the Magento autoloader.

php bin/magento module:enable AuroraExtensions_GoogleCloudStorage

Synchronization

You can initiate the bulk synchronization process through the Magento backend, just as you would with any other media storage configuration. Additionally, you can initiate the bulk synchronization process from the command line using the provided synchronization CLI command.

php bin/magento gcs:media:sync

IMPORTANT: This process can be very slow, especially if you have a lot of media files.

Service Account

For the purposes of authenticating with Google Cloud Platform, this module leverages the flexibility and ease of use provided by Google Cloud service accounts. Before moving forward, please make sure to complete the following:

  1. Create a Google Cloud service account with Storage Admin privileges. Once the service account is created, you will be prompted to download a JSON key file. Store this key file in a safe place.
  2. Install the service account JSON key file to the local or mounted filesystem with read-only permissions for the Magento user.
  3. Verify the following fields are set and correct in the environment configuration file (env.php):
    1. All required fields
    2. The Google Cloud project name is where the bucket exists
    3. The path to the Google Cloud service account JSON key file (e.g. /etc/gcs.json). Relative paths are assumed to be relative to the Magento root directory.
    4. [OPTIONAL] If you use the same bucket for multiple projects, you can specify a subdirectory to synchronize to inside the bucket. By default, it will synchronize to /.

For more information on Google Cloud service account keys, please see Creating and Managing Service Account Keys.

For an example configuration file, please see env.php.sample.

Troubleshooting

Given keyfile at path /path/to/magento was invalid

You need to create and install a service account key to authenticate with Google Cloud. See Service Account for specific details on Google Cloud service accounts.

统计信息

  • 总下载量: 6.58k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 1
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固