Download the PHP package hoga/lah5upload without Composer
On this page you can find all versions of the php package hoga/lah5upload. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hoga/lah5upload
More information about hoga/lah5upload
Files in hoga/lah5upload
Package lah5upload
Short Description 这是一个laravel-admin异步的阿里云oss分片上传插件,修改自https://github.com/JackSinner/h5upload
License MIT
Homepage https://github.com/harryhoga/lah5upload
Informations about the package lah5upload
H5 直传阿里云 oss 扩展
1.使用 composer 安装 hoga/lah5upload 扩展
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
添加代码
5.在 form 方法里面使用
$form->lah5upload('url','视频');
设置允许上传扩展的文件
设置 aliyun oss bucket 内的上传路径
关于.env 配置文件
分片上传 最后一个请求报错 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 错误
复制代码产生原因 经检查发现 ETag 为 undefined 解决方法 在阿里云 oss 控制台 基础设置 > 跨域规则设置 > 编辑规则 “暴露 Headers” 中增加 ETag 即可解决问题
作者:waanhappy 链接:https://juejin.im/post/5c4412186fb9a049d2365bbc 来源:掘金 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
All versions of lah5upload with dependencies
alibabacloud/sdk Version ^1.8
aliyuncs/oss-sdk-php Version ^2.3
encore/laravel-admin Version ~1.7