This repository was archived by the owner on Aug 22, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ public function fetch(Request $request)
102
102
return $ this ->error ('UPLOAD_ERR_NO_FILE ' );
103
103
}
104
104
$ urls = array_unique ($ urls );
105
-
105
+
106
106
$ list = array ();
107
107
foreach ($ urls as $ key => $ url ) {
108
108
$ img = $ this ->download ($ url , $ config );
@@ -144,7 +144,7 @@ private function download($url, $config)
144
144
$ img = new \SplFileInfo ($ pathRes ['path ' ]);
145
145
$ original = $ img ->getFilename ();
146
146
$ ext = $ img ->getExtension ();
147
- $ title = config ( ' ueditor.hash_filename ' ) ? md5 ($ original ) . '. ' . $ ext : $ original ;
147
+ $ title = md5 ($ url ) . '. ' . $ ext ;
148
148
$ filename = $ this ->formatPath ($ config ['path_format ' ], $ title );
149
149
$ info = [
150
150
'state ' => 'SUCCESS ' ,
@@ -169,7 +169,7 @@ private function download($url, $config)
169
169
}
170
170
$ content = stream_get_contents ($ file );
171
171
fclose ($ file );
172
-
172
+
173
173
$ info ['file ' ] = $ content ;
174
174
$ info ['siez ' ] = strlen ($ content );
175
175
return $ info ;
Original file line number Diff line number Diff line change 19
19
],
20
20
],
21
21
22
- // 是否使用 md5 格式文件名
23
- 'hash_filename ' => true ,
24
-
25
22
// 上传 配置
26
23
'upload ' => [
27
24
/* 前后端通信相关的配置,注释只允许使用多行方式 */
You can’t perform that action at this time.
0 commit comments