PHPackages                             fudaoji/php-upload - 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. fudaoji/php-upload

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

fudaoji/php-upload
==================

Upload Manager

1.1.1(2y ago)12961Apache-2.0PHPPHP &gt;=7.1.0

Since Jun 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/fudaoji/php-upload)[ Packagist](https://packagist.org/packages/fudaoji/php-upload)[ RSS](/packages/fudaoji-php-upload/feed)WikiDiscussions master Synced 1mo ago

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

dao-upload
==========

[](#dao-upload)

用于PHP文件上传（PHP 7.1+），支持本地、七牛、阿里云(oss)、腾讯云(cos)等上传方式。

安装
--

[](#安装)

```
composer require fudaoji/php-upload

```

用法：
---

[](#用法)

```
use Dao\Upload\Upload;
//上传本地
$config = [
        'mimes'         =>  [], //允许上传的文件MiMe类型
        'maxSize'       =>  0, //上传的文件大小限制 (0-不做限制)
        'exts'          =>  [], //允许上传的文件后缀
        'autoSub'       =>  true, //自动子目录保存文件
        'subName'       =>  ['date', 'Y-m-d'], //子目录创建方式，[0]-函数名，[1]-参数，多个参数使用数组
        'rootPath'      =>  './public/uploads/', //保存根路径
        'savePath'      =>  '', //保存路径
        'saveName'      =>  ['uniqid', ''], //上传文件命名规则，[0]-函数名，[1]-参数，多个参数使用数组
        'saveExt'       =>  '', //文件保存后缀，空则使用原后缀
        'replace'       =>  false, //存在同名是否覆盖
    ];

$Upload = new Uploader($config, 'local', []);
$info   = $Upload->upload($files, '文件名前缀，选填');  //false || [{}]

//上传七牛
$config = [
        'mimes'         =>  [], //允许上传的文件MiMe类型
        'maxSize'       =>  0, //上传的文件大小限制 (0-不做限制)
        'exts'          =>  [], //允许上传的文件后缀
        'autoSub'       =>  true, //自动子目录保存文件
        'subName'       =>  ['date', 'Y-m-d'], //子目录创建方式，[0]-函数名，[1]-参数，多个参数使用数组
        'rootPath'      =>  '', //保存根路径
        'savePath'      =>  '', //保存路径
        'saveName'      =>  ['uniqid', ''], //上传文件命名规则，[0]-函数名，[1]-参数，多个参数使用数组
        'saveExt'       =>  '', //文件保存后缀，空则使用原后缀
        'replace'       =>  false, //存在同名是否覆盖
    ];
//七牛的配置
$driver_config = [
    'accessKey' => '',
    'secrectKey' => '',
    'bucket' => '',
    'domain' => '',
];
$Upload = new Uploader($config, 'qiniu', $driver_config);
$info   = $Upload->upload($files, '文件名前缀，选填');  //false || [{}]

//阿里云的配置
$driver_config = [
    'accessKey' => '', //对应oss的AccessKeyId
    'secrectKey' => '', //对应oss的AccessKeySecret
    'bucket' => '',
    'domain' => '',
];
$Upload = new Uploader($config, 'aliyun', $driver_config);
$info   = $Upload->upload($files, '文件名前缀，选填');  //false || [{}]

//腾讯云的配置
$driver_config = [
    'accessKey' => '', //对应cos的secretId
    'secrectKey' => '', //对应cos的secretKey
    'region' => '', //区域
    'bucket' => '',
    'domain' => '',
];
$Upload = new Uploader($config, 'qcloud', $driver_config);
$info   = $Upload->upload($files, '文件名前缀，选填');  //false || [{}]
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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

Unknown

Total

1

Last Release

1057d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/24e79c5afdde8482fb407e679e904b656f99e5b15683a7700e28cb58b5a653a8?d=identicon)[fudaoji](/maintainers/fudaoji)

### Embed Badge

![Health badge](/badges/fudaoji-php-upload/health.svg)

```
[![Health](https://phpackages.com/badges/fudaoji-php-upload/health.svg)](https://phpackages.com/packages/fudaoji-php-upload)
```

###  Alternatives

[yangyifan/upload

上传 SDK for Laravel

12422.6k3](/packages/yangyifan-upload)

PHPackages © 2026

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