This repository was archived by the owner on Aug 22, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 13
13
"Overtrue\\ LaravelUEditor\\ " :" src/"
14
14
}
15
15
},
16
- "require" : {},
16
+ "require" : {
17
+ "qiniu/php-sdk" : " 7.*"
18
+ },
17
19
"require-dev" : {
18
20
"fabpot/php-cs-fixer" : " ^1.10"
19
21
}
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ class QiNiuStorage implements StorageInterface
33
33
public function store (UploadedFile $ file , $ filename )
34
34
{
35
35
$ uploadManager = new UploadManager ();
36
+
36
37
list ($ result , $ error ) = $ uploadManager ->putFile (
37
38
$ this ->getQiNiuAuth ()->uploadToken (config ('filesystems.disks.qiniu.bucket ' )),
38
39
basename ($ filename ),
@@ -90,6 +91,8 @@ public function getUrl($filename)
90
91
}
91
92
92
93
/**
94
+ * Get QiNiu auth object.
95
+ *
93
96
* @return string
94
97
*/
95
98
protected function getQiNiuAuth ()
@@ -99,6 +102,8 @@ protected function getQiNiuAuth()
99
102
100
103
101
104
/**
105
+ * Get QiNiu url base on file key.
106
+ *
102
107
* @param $key
103
108
* @return string
104
109
*/
@@ -108,6 +113,8 @@ protected function getQiNiuUrl($key)
108
113
}
109
114
110
115
/**
116
+ * Get QiNiu operation object.
117
+ *
111
118
* @return Operation
112
119
*/
113
120
protected function getQiNiuOperation ()
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
return [
4
- // 存储引擎:filesystem.php 中 disks
5
- 'disk ' => 'qiniu ' ,
4
+ // 存储引擎:filesystem.php 中 disks,local 或 qiniu
5
+ 'disk ' => 'local ' ,
6
6
7
7
'route ' => [
8
8
'name ' => '/ueditor/server ' ,
You can’t perform that action at this time.
0 commit comments