PHPackages                             baymaxrice/laravel-upload-file - 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. baymaxrice/laravel-upload-file

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

baymaxrice/laravel-upload-file
==============================

A upload tool for laravel application.

v0.1.4(7y ago)118MITPHP

Since Nov 21Pushed 7y ago1 watchersCompare

[ Source](https://github.com/BaymaxRice/laravel-upload-file)[ Packagist](https://packagist.org/packages/baymaxrice/laravel-upload-file)[ RSS](/packages/baymaxrice-laravel-upload-file/feed)WikiDiscussions master Synced yesterday

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

install
=======

[](#install)

`composer require baymaxrice/laravel-upload-file`

usage
=====

[](#usage)

- 发布配置文件

`php artisan vendor:publish --provider="Baymax\LaravelUploadFile\UploadFileServiceProvider"`

- 系统会自动创建一条路由： `/upload/file`
- 访问该接口时候，如上传文件，则携带参数：file=1，如上传图片，则携带参数：img=1。。。

---

- 注意事项：

开启缓存之后，上传图片，返回json格式回复，具体内容如下：

```
{
    "status": "success",
    "code": 200,
    "message": "tmp/RmxBSXl5EKtd6BBZEr338SQqBo4CLGafadK0t0LK.jpeg"
}
```

需要在用户提交该字段之后，假如上传的为用户头像字段，则在用户Model当中做如下处理：

```
    public function getAvatarAttribute($value)
    {
        return FileStore::showImages($value);
    }

    public function setAvatarAttribute($value)
    {
        return $this->attributes['avatar'] = FileStore::tmpStore($value);
    }
```

如果参数是图片数组，则传入第二个参数为：`true`

如不开启缓存，则直接返回图片实际存储路径：

```
{
    "status": "success",
    "code": 200,
    "message": "images/2018-11-20/0jas5bd2VimrydJCvOeXQ1biTbzAiHN3Mm6zhWid.jpeg"
}
```

License
-------

[](#license)

MIT

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

2729d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb7552fe35c19b4c9b2bb6e4e0a427d05c227fa421acf81e78b80cdcbc581036?d=identicon)[baymax-umasou](/maintainers/baymax-umasou)

---

Top Contributors

[![baymax-umasou](https://avatars.githubusercontent.com/u/39851518?v=4)](https://github.com/baymax-umasou "baymax-umasou (8 commits)")

### Embed Badge

![Health badge](/badges/baymaxrice-laravel-upload-file/health.svg)

```
[![Health](https://phpackages.com/badges/baymaxrice-laravel-upload-file/health.svg)](https://phpackages.com/packages/baymaxrice-laravel-upload-file)
```

###  Alternatives

[overtrue/laravel-filesystem-qiniu

A Qiniu storage filesystem for Laravel.

482229.7k16](/packages/overtrue-laravel-filesystem-qiniu)[rahulhaque/laravel-filepond

Use FilePond the Laravel way

261114.4k2](/packages/rahulhaque-laravel-filepond)[overtrue/laravel-filesystem-cos

A Cos storage filesystem for Laravel.

92128.4k7](/packages/overtrue-laravel-filesystem-cos)

PHPackages © 2026

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