Skip to content

ExerciseBook/thinkphp-storage-imagex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Storage ThinkPHP Provider

准备

  • 创建 ImageX 服务并且服务能够使用。
  • 确保服务已经开启了原地址访问和上传任意文件功能。
    这两个功能默认关闭,需要 提工单 申请开启。
    工单信息:
    • 问题类型:图片解决方案 / 功能配置
    • 问题描述:PHP框架源地址访问配置

配置

  1. 通过 Composer 安装本库。

        composer require exercisebook/thinkphp-storage-imagex
    
  2. 编辑 config/filesystem.php 添加 ImageX 的连接设置。

       
            'imagex' => [
                'type' => 'imagex',
    
                'region' => 'Region',             // 如:cn-north-1
                'access_key' => 'Access Key',
                'secret_key' => 'Secret Key',
                'service_id' => 'Service ID',
                'domain' => 'Binding Domain'      // 填写该图片服务所绑定的域名如 imagex.superexercisebook.com。推荐以 https:// 开头。该值用来拼接 url。
            ],
  3. 即可通过 $this->app->filesystem->disk("imagex")->putFile(); 使用 ImageX。

About

ImageX ThinkPHP Storage Provider

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages