PHPackages                             hoga/lah5upload - 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. hoga/lah5upload

ActiveLibrary

hoga/lah5upload
===============

这是一个laravel-admin异步的阿里云oss分片上传插件,修改自https://github.com/JackSinner/h5upload

1.0.4(5y ago)247MITPHPPHP &gt;=7.0.0CI failing

Since Mar 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/harryhoga/lah5upload)[ Packagist](https://packagist.org/packages/hoga/lah5upload)[ Docs](https://github.com/harryhoga/lah5upload)[ RSS](/packages/hoga-lah5upload/feed)WikiDiscussions master Synced today

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

H5 直传阿里云 oss 扩展
===============

[](#h5-直传阿里云-oss-扩展)

### 1.使用 composer 安装 hoga/lah5upload 扩展

[](#1使用-composer-安装-hogalah5upload-扩展)

```
composer require hoga/lah5upload -vvvv

```

### 2.导出资源文件

[](#2导出资源文件)

`windows`:`php artisan vendor:publish --provider=Hoga\lah5upload\lah5uploadServiceProvider`

`mac|linux`:`php artisan vendor:publish --provider=Hoga\\lah5upload\\lah5uploadServiceProvider`

### 3.在`app/Admin/bootstrap.php`添加代码

[](#3在appadminbootstrapphp添加代码)

```
Encore\Admin\Form::extend('lah5upload', \Hoga\lah5upload\lah5uploadFiled::class);

```

### 5.在 form 方法里面使用

[](#5在-form-方法里面使用)

`$form->lah5upload('url','视频');`

### 设置允许上传扩展的文件

[](#设置允许上传扩展的文件)

```
可选扩展:video视频类型文件 file所有类型的文件 mp3音频文件 image图片文件
$form->lah5upload('url','视频')->setExpansion('video');

```

### 设置 aliyun oss bucket 内的上传路径

[](#设置-aliyun-oss-bucket-内的上传路径)

```
$form->lah5upload('url','视频')->setOssPath('video');

```

### 关于.env 配置文件

[](#关于env-配置文件)

```
请打开网站https://help.aliyun.com/document_detail/100624.html?spm=a2c4g.11186623.2.10.316879b0jDJxFq#concept-xzh-nzk-2gb根据提升一步一步添加配置

```

分片上传 最后一个请求报错 One or more of the specified parts could not be found or the specified entity tag might not have matched the part's entity tag 错误

```
// 响应信息

  InvalidPart
  One or more of the specified parts could not be found or the specified entity tag might not have matched the part's entity tag.
  5C455831BB4097C0D8F96794
  wolaile.oss-cn-hangzhou.aliyuncs.com
  undefined
  1
  4B1BF2F5DE064694870DD46E657F0CA6

```

复制代码产生原因 经检查发现 ETag 为 undefined 解决方法 在阿里云 oss 控制台 基础设置 &gt; 跨域规则设置 &gt; 编辑规则 “暴露 Headers” 中增加 ETag 即可解决问题

作者：waanhappy 链接：来源：掘金 著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

2

Last Release

1879d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/50dc76d5cd6af7906cec065608dc9c246bbc9ed113a7b5f25c02cd449d2c9d17?d=identicon)[harryhoga](/maintainers/harryhoga)

---

Top Contributors

[![harryhoga](https://avatars.githubusercontent.com/u/10841714?v=4)](https://github.com/harryhoga "harryhoga (22 commits)")

---

Tags

extensionaliyunosslaravel-admin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hoga-lah5upload/health.svg)

```
[![Health](https://phpackages.com/badges/hoga-lah5upload/health.svg)](https://phpackages.com/packages/hoga-lah5upload)
```

###  Alternatives

[laravel-admin-ext/grid-lightbox

Turn your grid into a lightbox &amp; gallery

58180.9k2](/packages/laravel-admin-ext-grid-lightbox)[laravel-admin-ext/sparkline

Integrates jQuery sparkline into laravel-admin

161.1k](/packages/laravel-admin-ext-sparkline)

PHPackages © 2026

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