PHPackages                             james.xue/laravel-filesystem-oss - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. james.xue/laravel-filesystem-oss

ActiveLibrary[File &amp; Storage](/categories/file-storage)

james.xue/laravel-filesystem-oss
================================

用于laravel的aliyun oss文件系统存储 aliyun oss filesystem storage for laravel

1.0.1(6y ago)2659MITPHPPHP &gt;=7.0

Since Sep 6Pushed 6y ago1 watchersCompare

[ Source](https://github.com/xiaoxuan6/laravel-filesystem-oss)[ Packagist](https://packagist.org/packages/james.xue/laravel-filesystem-oss)[ Docs](https://github.com/xiaoxuan6/laravel-filesystem-oss)[ RSS](/packages/jamesxue-laravel-filesystem-oss/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (3)Used By (0)

aliyun oss filesystem storage for laravel
=========================================

[](#aliyun-oss-filesystem-storage-for-laravel)

Aliyun oss filesystem storage adapter for laravel. You can use Aliyun OSS just like laravel Storage as usual.

Require
-------

[](#require)

- Laravel 5.\*

\##Installation you can simply run below command to install:

```
"composer require james.xue/laravel-filesystem-oss"

```

Configuration
-------------

[](#configuration)

Add the following in app/filesystems.php:

```
'disks'=>[
    ...
    'oss' => [
            'driver'        => 'oss',
            'access_id'     => '',
            'access_key'    => '',
            'bucket'        => '',
            'endpoint'      => '', // OSS 外网节点或自定义外部域名
            //'endpoint_internal' => '', // 如果为空，则默认使用 endpoint 配置
            'cdnDomain'     => '', // 如果isCName为true, getUrl会判断cdnDomain是否设定来决定返回的url，如果cdnDomain未设置，则使用endpoint来生成url，否则使用cdn
            'ssl'           =>  // true to use 'https://' and false to use 'http://'. default is false,
            'isCName'       =>  // 是否使用自定义域名,true: 则Storage.url()会使用自定义的cdn或域名生成文件url， false: 则使用外部节点生成url (目前不支持自定义域名，可手动替换域名使用)
            'prefix'        => ''
    ],
    ...
]
```

Ok, well! You are finish to configure. Just feel free to use Aliyun OSS like Storage!

Usage
-----

[](#usage)

```
Storage::disk('oss'); // if default filesystems driver is oss, you can skip this step

//fetch all files of specified bucket(see upond configuration)

Storage::put('path/to/file/file.jpg', $contents); //first parameter is the target file path, second paramter is file content
Storage::putFile('path/to/file/file.jpg', 'local/path/to/local_file.jpg'); // upload file from local path

Storage::get('path/to/file/file.jpg'); // get the file object by path
Storage::size('path/to/file/file.jpg'); // get the file size (Byte)

Storage::copy('old/file1.jpg', 'new/file1.jpg');
Storage::rename('path/to/file1.jpg', 'path/to/file2.jpg');

Storage::delete('file.jpg');
Storage::delete(['file1.jpg', 'file2.jpg']);

Storage::putRemoteFile('target/path/to/file/jacob.jpg', 'http://example.com/jacob.jpg'); //upload remote file to storage by remote url
Storage::url('path/to/img.jpg') // get the file url
```

Documentation
-------------

[](#documentation)

More development detail see [Aliyun OSS DOC](https://help.aliyun.com/document_detail/32099.html?spm=5176.doc31981.6.335.eqQ9dM)

License
-------

[](#license)

Source code is release under MIT license. Read LICENSE file for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2441d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f8fdd2069c7594101452a5c802ae01209a31109d67a9299a67320752c30a1de?d=identicon)[xiaoxuan6](/maintainers/xiaoxuan6)

---

Tags

laravelstoragefilesystemsaliyunoss

### Embed Badge

![Health badge](/badges/jamesxue-laravel-filesystem-oss/health.svg)

```
[![Health](https://phpackages.com/badges/jamesxue-laravel-filesystem-oss/health.svg)](https://phpackages.com/packages/jamesxue-laravel-filesystem-oss)
```

###  Alternatives

[jacobcyl/ali-oss-storage

aliyun oss filesystem storage for laravel 5+

523566.2k7](/packages/jacobcyl-ali-oss-storage)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
