symbiote/silverstripe-s3cdn 问题修复 & 功能扩展

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

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

symbiote/silverstripe-s3cdn

Composer 安装命令:

composer require symbiote/silverstripe-s3cdn

包简介

S3 CDN services for the content-services module

README 文档

README

Configuration

In your local configuration, specify something like the following to configure the content Reader/Writer pair, along with actually binding them to usable content stores for the CDN

---
Name: locals3settings
After: 
  - '#s3services'
---
Injector:
  S3Service:
    constructor:
      key: {your_api_key}
      secret: {your_api_secret}
          region: {region}
  S3ContentReader:
    type: prototype
    properties:
      s3service: %$S3Service
      bucket: {your_bucket_name}
      baseUrl: https://{your_bucket_name}.s3.amazonaws.com
  S3ContentWriter:
    type: prototype
    properties:
      s3service: %$S3Service
      bucket: {your_bucket_name}
      baseUrl: https://{your_bucket_name}.s3.amazonaws.com
  ContentService:
    constructor:
      defaultStore: Default
    properties:
      stores:
        Default:
          ContentReader: S3ContentReader
          ContentWriter: S3ContentWriter

Additionally, ensure you have the CDNFile extensions bound from the cdncontent module

File:
  extensions:
    - CDNFile
Folder: 
  extensions:
    - CDNFolder

To change the default ACL applied on upload reconfigure the defaultAcl option

Injector
  S3ContentWriter:
    type: prototype
    properties:
      s3Service: %$S3Service
      bucket: bucket
      defaultAcl: ""

See the CDN Content module for more details

Migrations

If you're looking to migrate either to, or from S3, please take a look at the build tasks included.

Troubleshooting

Resampled Images

The following queries may need to be run if you've done an SS upgrade and/or swapped to a new URL. This makes sure that all images are resampled correctly.

UPDATE File SET ResamplingsValue = '';
TRUNCATE TABLE `SilverStripeAustralia\ContentServiceAssets\ContentServiceAsset`;
TRUNCATE TABLE `Symbiote\ContentServiceAssets\ContentServiceAsset`;

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 9
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-06-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固