nomedia / laravel_admin_alioss_file_images
laravel-admin扩展,web直传阿里OSS(file,image,editor)
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Language:JavaScript
Requires
- php: >=7.0.0
- encore/laravel-admin: ~1.6
Requires (Dev)
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2024-05-17 14:52:52 UTC
README
扩展laravel-admin,web直传阿里OSS(file,image,editor)
安装
composer require airan/alioss-form
php artisan vendor:publish --tag=alioss-form
配置
新建配置文件config/alioss.php
<?php
return [
'OSS_ACCESS_ID' => '0I********Dx',
'OSS_ACCESS_KEY' => 'N*******************NT',
'OSS_ENDPOINT' => 'oss-cn-*****.aliyuncs.com',
'OSS_BUCKET' => '*******',
'OSS_HOST' => 'http://******.oss-cn-****.aliyuncs.com',
//前台显示域名
'OSS_URL' => 'http://********.oss-cn-*****.aliyuncs.com'
];
使用
$form->file('pic', '单图');
$form->image('images', '多图');
$form->editor('content', '编辑器');