PHPackages                             lincoo/aliyun\_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. lincoo/aliyun\_oss

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

lincoo/aliyun\_oss
==================

阿里云oss存储第三方服务

09PHP

Since Jul 4Pushed 7y ago1 watchersCompare

[ Source](https://github.com/duanjin123/aliyun_oss)[ Packagist](https://packagist.org/packages/lincoo/aliyun_oss)[ RSS](/packages/lincoo-aliyun-oss/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Lavel学习之compoer包开发
------------------

[](#lavel学习之compoer包开发)

简介
--

[](#简介)

- 本项目为oss测试项目，旨在简单实现上传文件功能，代码简陋；
- 提供了上传功能，上传后返回oss请求地址；
- 提供了检查文件是否在oss存在的功能，返回bool类型；
- 提供了删除oss上一个或多个文件的功能；
- 第一次开发composer包，不喜勿喷

#### 一、安装

[](#一安装)

1、修改composer.json，加入：

```
{
    "require": {
        "lincoo/aliyun_oss": "dev-master"
    }
}

```

然后执行：

```
composer update

```

或者直接：

```
composer require "lincoo/aliyun_oss"

```

2、修改config/app.php，在providers数组下加入:

```
Lincoo\AliyunOSS\AliyunOssServiceProvider::class,

```

在aliases下加入：

```
'Client' => Lincoo\AliyunOSS\Client::class

```

3、发布包配置文件

```
php artisan vendor:publish

```

（记得在.env中加入相关配置）

4、重新加载autoload

```
composer dumpautoload

```

#### 二、使用示例

[](#二使用示例)

在controller中上传本地文件：

```
public function index(Client $client)
{
    $ossUploadUrl = $client->put($bucket, $object, $path, $acl);
    return $ossUploadUrl;
}

```

其中$bucket是容器名，$object是上传后的文件名（前面可以加具体路径），$path是本地文件路径，$acl是文件的权限，可选值为private(私有)/public-read(公共读)/public-read-write(公共读写)

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19526270?v=4)[lincoo](/maintainers/lincoo)[@Lincoo](https://github.com/Lincoo)

---

Top Contributors

[![duanjin123](https://avatars.githubusercontent.com/u/20664506?v=4)](https://github.com/duanjin123 "duanjin123 (7 commits)")

### Embed Badge

![Health badge](/badges/lincoo-aliyun-oss/health.svg)

```
[![Health](https://phpackages.com/badges/lincoo-aliyun-oss/health.svg)](https://phpackages.com/packages/lincoo-aliyun-oss)
```

###  Alternatives

[venveo/craft-compress

Create smart zip files from Craft assets on the fly

124.7k](/packages/venveo-craft-compress)

PHPackages © 2026

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