承接 leeroy/sail-fs3 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

leeroy/sail-fs3

最新稳定版本:v1.0.7

Composer 安装命令:

composer require leeroy/sail-fs3

包简介

S3 Filesystem Adapter for SailCMS

README 文档

README

This is the official S3 Filesystem adapter for SailCMS. This adapter is module that you will be able to load and it will make the 's3://' protocol available to you.

Installing

php sail install:official leeroy/sail-fs3

This will install the package using composer and then update your composer file to autoload the package.

If you wish to install it manually, you and perform the following

composer require leeroy/sail-fs3

After that, you can add Leeroy\\FS3 to the modules section of the sailcms property of your composer.json file. It should look something like this:

"sailcms": {
  "containers": ["Spec"],
  "modules": [
    "Leeroy\\FS3"
  ],
  "search": {}
}

Configuration

When installed, you need to add the following to your .env file.

FS3_API_KEY=aws_key
FS3_API_SECRET=aws_secret
FS3_REGION=aws_region
FS3_BUCKET=bucket_name
FS3_ACL=public

Using

When you want to upload something, you can do something like this:

$fs = Filesytem::manager();
$fs->write('s3://file/path.jpg', $data, ['visibility' => 'public']);

If you want your file to be accessible by unsigned urls, you need to pass the visibility option and set it to public.

For the assets in SailCMS, set the adapter to s3 in your config/general.php in the assets section. SailCMS automatically sets the file to public visibility.

You can now enjoy the S3 on your site.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固