PHPackages                             siaoynli/laravel-alioss - 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. siaoynli/laravel-alioss

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

siaoynli/laravel-alioss
=======================

aliyun oss for Laravel.

1.1.6(4y ago)085MITPHP

Since Nov 19Pushed 4y ago1 watchersCompare

[ Source](https://github.com/siaoynli/laravel-alioss)[ Packagist](https://packagist.org/packages/siaoynli/laravel-alioss)[ RSS](/packages/siaoynli-laravel-alioss/feed)WikiDiscussions master Synced yesterday

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

alioss
======

[](#alioss)

基于aliyuncs/oss-sdk-php项目上对Laravel框架的扩展

使用
--

[](#使用)

.env添加

```
ACCESS_KEY_ID=key
ACCESS_KEY_SECRET=xxx
OSS_ENDPOINT=oss-cn-hangzhou.aliyuncs.com
OSS_BUCKET=cn-hangzhou
OSS_BUCKET_HOST=

```

filesystem.php添加oss驱动

```
'alioss' => [
            'driver' => 'alioss',
            'key' => env('ACCESS_KEY_ID'),
            'secret' => env('ACCESS_KEY_SECRET'),
            'region' => env('OSS_ENDPOINT'),
            'bucket' => env('OSS_BUCKET'),
            'url' => env('OSS_BUCKET_HOST'),
],

```

安装

```
 composer require siaoynli/laravel-alioss

```

使用
--

[](#使用-1)

有两种使用方法，第一种是调用 Laravel 的 Filesystem 组件进行操作阿里云OSS上的对象，第二种是直接使用本扩展所提供的方法。

### 使用 Filesystem 组件

[](#使用-filesystem-组件)

使用以下方式进行调用：

```
Storage::disk('alioss')->write('/test/text', '这是一段测试文字！');
Storage::disk('alioss')->update('/test/text', '这是一段修改后的测试文字！');
Storage::disk('alioss')->writeStream('/test/file', fopen('/text.txt', 'r'));
Storage::disk('alioss')->updateStream('/test/file', fopen('/newtext.txt', 'r'));
Storage::disk('alioss')->rename('/test/text', '/test/newtext');
Storage::disk('alioss')->copy('/test/newtext', '/test/text');
Storage::disk('alioss')->delete('/test/text');
Storage::disk('alioss')->deleteDir('/test');
Storage::disk('alioss')->has('/test/text');
Storage::disk('alioss')->read('/test/text');
Storage::disk('alioss')->readStream('/test/text');
Storage::disk('alioss')->listContents('/test');
Storage::disk('alioss')->getMetadata('/test/text');
Storage::disk('alioss')->getSize('/test/text');
Storage::disk('alioss')->getMimetype('/test/text');
Storage::disk('alioss')->getTimestamp('/test/text');
Storage::disk('alioss')->getVisibility('/test/text');
```

### 使用扩展方法

[](#使用扩展方法)

配置了别名后，可以直接使用以下语法调用：

```
Alioss::write('test/text', '这是一段测试文字！');
Alioss::has('test/text');
Alioss::getSize('test/text');
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~117 days

Recently: every ~205 days

Total

8

Last Release

1547d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7235227?v=4)[西瓜哥](/maintainers/siaoynli)[@siaoynli](https://github.com/siaoynli)

---

Top Contributors

[![siaoynli](https://avatars.githubusercontent.com/u/7235227?v=4)](https://github.com/siaoynli "siaoynli (3 commits)")

### Embed Badge

![Health badge](/badges/siaoynli-laravel-alioss/health.svg)

```
[![Health](https://phpackages.com/badges/siaoynli-laravel-alioss/health.svg)](https://phpackages.com/packages/siaoynli-laravel-alioss)
```

###  Alternatives

[jacobcyl/ali-oss-storage

aliyun oss filesystem storage for laravel 5+

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

Flysystem adapter for the Oss storage.

95607.5k26](/packages/iidestiny-flysystem-oss)[xxtime/flysystem-aliyun-oss

AliYun OSS adapter for flysystem. Support PHP8. aliyuncs/oss-sdk-php ~2.6

51505.3k28](/packages/xxtime-flysystem-aliyun-oss)[yangyifan/upload

上传 SDK for Laravel

12422.6k3](/packages/yangyifan-upload)[alphasnow/aliyun-oss-flysystem

Flysystem adapter for the Aliyun storage

14249.2k4](/packages/alphasnow-aliyun-oss-flysystem)[summergeorge/ali-oss-storage

aliyun oss filesystem storage for laravel 5+

3915.5k](/packages/summergeorge-ali-oss-storage)

PHPackages © 2026

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