fentoo / h5upload
这是一个laravel-admin异步的阿里云oss上传资源插件
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:JavaScript
Requires
- php: >=7.0.0
- alibabacloud/sdk: 1.8.245
- encore/laravel-admin: ~1.7
Requires (Dev)
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2024-10-24 18:36:45 UTC
README
#H5直传阿里云oss扩展
###1.使用composer安装fentoo/h5upload扩展
composer require fentoo/h5upload dev-master -vvvv
###2.导出资源文件
windows
:php artisan vendor:publish --provider=Encore\h5upload\h5uploadServiceProvider
mac|linux
:php artisan vendor:publish --provider=Encore\\h5upload\\h5uploadServiceProvider
###3.在app/Admin/bootstrap.php
添加代码
Encore\Admin\Form::extend('h5upload', \Encore\h5upload\h5uploadFiled::class);
###5.在form方法里面使用
$form->h5upload('url','视频');
###设置允许上传扩展的文件
可选扩展:video视频类型文件 file所有类型的文件 mp3音频文件 image图片文件
$form->h5upload('url','视频')->setExpansion('video');
###tips
如果有什么问题可以联系email:643145444@qq.com,作者会在时间充足的情况下更新扩展
###有更好的点子
###1.修改composer.json文件的repositories 加入
"h5upload": {
"type": "path",
"url": "app/Admin/Extensions/laravel-admin-ext/h5upload"
}