Giter Site home page Giter Site logo

laravel-flysystem-oss's Introduction

Laravel-flysystem-oss

Stable Version Total Downloads License

适用于 Laravel 的阿里云 OSS 适配器,完整支持阿里云 OSS 所有方法和操作。

安装

composer require larva/laravel-flysystem-oss -vv

修改配置文件: config/filesystems.php

添加一个磁盘配置

'oss' => [
    'driver'     => 'oss',
    'access_id' => env('OSS_ACCESS_ID', 'your id'),
    'access_key' => env('OSS_ACCESS_KEY', 'your key'),
    'bucket' => env('OSS_BUCKET', 'your bucket'),
    'endpoint' => env('OSS_ENDPOINT', 'your endpoint'),//不要用CName,经过测试,官方SDK实现不靠谱
    'url' => env('OSS_URL','cdn url'),//CNAME 写这里,可以是域名绑定或者CDN地址 如 https://www.bbb.com 末尾不要斜杠
    'root' => env('OSS_ROOT', ''), // 这个文件路径前缀,如果上传的内容全部在子目录就填写,否则为空
    'security_token' => null,
    'proxy' => null,
    'timeout' => 3600,
    'ssl' => true
],

修改默认存储驱动

    'default' => 'oss'

使用

参见 Laravel wiki

laravel-flysystem-oss's People

Contributors

larvacent avatar xutl avatar

Stargazers

sakmon avatar Eros avatar imnpc avatar  avatar Jeffrey Q avatar  avatar

Watchers

James Cloos avatar

Forkers

imnpc

laravel-flysystem-oss's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.