https://github.com/link1st/laravel-ks3
金山云存储
https://github.com/link1st/laravel-ks3
Last synced: 5 months ago
JSON representation
金山云存储
- Host: GitHub
- URL: https://github.com/link1st/laravel-ks3
- Owner: link1st
- License: mit
- Created: 2017-07-15T04:36:03.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-18T09:55:50.000Z (over 8 years ago)
- Last Synced: 2025-09-04T04:44:12.241Z (11 months ago)
- Language: PHP
- Size: 65.4 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# laravel-sk3
金山云存储
## 安装
加载包
`"link1st/laravel-ks3": "dev-master"`
或
`composer require link1st/laravel-ks3`
在配置文件中添加 **config/app.php**
```php
'providers' => [
/**
* 添加供应商
*/
link1st\Ks3\Ks3ServiceProvider::class,
],
'aliases' => [
/**
* 添加别名
*/
'Ks3' => link1st\Ks3\Facades\Ks3::class,
],
```
生成配置文件
`php artisan vendor:publish`
设置金山云的参数 **config/ks3.php**
## 使用
- - -
### 上传图片 获取图片url 失败返回false
- `$file_path` 本地文件路径
- `$new_file_name` 上传以后新的文件名
```
\Ks3::putObjectByFile($file_path,$new_file_name);
```