定制 custom-d/zon-storage 二次开发

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

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

custom-d/zon-storage

Composer 安装命令:

composer require custom-d/zon-storage

包简介

A storage api plugin for zon projects

关键字:

README 文档

README

Installation:

  1. In your zon projects composer.json add to the bottom:
"repositories": [
    {
      "type": "vcs",
      "url": "git@git.customd.com:composer/zon-storage.git"
    }
  ]

then run composer require custom-d/zon-storage

  1. Run site/_composer/bin/zon-storage-setup or fin exec site/_composer/bin/zon-storage-setup and follow the prompts

  2. confirm you now have migrations, models etc setup configure and run the migration

  3. In your site/application/libraries folder a new file: DF_Files.php with the following content should exist

<?php

require_once(dirname(__DIR__) . '/zon/libraries/DF_Files.php');

use CustomD\ZonStorage\StorageTrait;

class My_DF_Files extends DF_Files
{
    use StorageTrait;
}

  1. If needed copy the files from zon/controllers to your own controllers dir. add at the top of the class:
use CustomD\ZonStorage\hasStorageTrait;

class Files
{
    use hasStorageTrait;

and look for any references to upload / upload_files methods and the variable set for $display_url and update to use a bucket name:

eg:

    $display_url = (empty($this->input->post('display_url')) ? 'files/display' : $this->input->post('display_url'));

Becomes

$display_url = (empty($this->input->post('bucket')) ? 'local' : $this->input->post('bucket'));

The last step will involve looking where you use the df_files upload methods and altering the first part to being a bucket name. (alternatively you could set a file config for files/display in your storage config file.)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固