定制 fof/s3-assets 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

fof/s3-assets

最新稳定版本:1.0.0-beta.4

Composer 安装命令:

composer require fof/s3-assets

包简介

Relocate Flarum disks onto S3 or compatible bucket

关键字:

README 文档

README

A Flarum extension. Relocate Flarum disks onto S3 or compatible bucket

Installation

Install with composer:

composer require fof/s3-assets:"*"

Updating

composer update fof/s3-assets
php flarum cache:clear

Configuration

The S3 (or compatible) bucket can be configured either by environment variables or via the extension settings. If the environment variables are set, they will override the settings entered in the admin panel, if set.

Environment variables

  • FOF_S3_ACCESS_KEY_ID - your access key ID *
  • FOF_S3_SECRET_ACCESS_KEY - your secret *
  • FOF_S3_REGION - the region *
  • FOF_S3_BUCKET - the bucket name *
  • FOF_S3_URL - the public facing base URL of the bucket
  • FOF_S3_ENDPOINT - the ARN
  • FOF_S3_ACL - The ACL, if any, that should be applied to the uploaded object. For possible values, see AWS Docs
  • FOF_S3_PATH_STYLE_ENDPOINT - boolean value
  • FOF_S3_CACHE_CONTROL - Optional. Specify the max-age header files should be served with, for example 3153600 (1 year). 0 or not set = no caching.

* denotes the minimum requirements for using S3 on AWS. S3-compatible services will require more.

If you plan to setup the S3 configuration using the environment variables, please ensure these are set before enabling the extension

Transferring assets from the existing filesystem to the S3 bucket

After your new bucket is configured, any exisiting files, will not exist there (ie uploaded avatars, profile covers, etc).

Use the provided command to start copying these files. An optional additional paramater --move will delete the files from your local filesystem after a successful copy.

php flarum fof:s3:copy --move

Links

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-22