Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wyzheng1997/alioss-form
https://github.com/wyzheng1997/alioss-form
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/wyzheng1997/alioss-form
- Owner: wyzheng1997
- License: mit
- Created: 2018-12-22T11:33:00.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-01T03:30:36.000Z (over 5 years ago)
- Last Synced: 2024-05-21T13:53:31.164Z (7 months ago)
- Language: JavaScript
- Size: 513 KB
- Stars: 33
- Watchers: 0
- Forks: 7
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-laravel-admin - alioss-form - 上传文件至阿里云对象存储OSS (扩展包 / 工具类扩展包)
README
laravel-admin extension
======
扩展laravel-admin,web直传阿里OSS(file,image,editor)### 安装
```
composer require airan/alioss-form
php artisan vendor:publish --tag=alioss-form
```
### 配置
新建配置文件config/alioss.php
```
'0I********Dx',
'OSS_ACCESS_KEY' => 'N*******************NT',
'OSS_ENDPOINT' => 'oss-cn-*****.aliyuncs.com',
'OSS_BUCKET' => '这里配置BUCKET名',
'OSS_HOST' => 'http://.oss-cn-****.aliyuncs.com',
//前台显示域名
'OSS_URL' => 'http://.oss-cn-*****.aliyuncs.com', // CDN域名,没有CDN就和OSS_HOST一致即可
];
```### 使用
```
$form->file('pic', '单图');
$form->image('images', '多图');
$form->editor('content', '编辑器');
```### 截图
![](https://github.com/airan587/alioss-form/blob/master/1.PNG?raw=true)