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)
102102 return $ this ->error ('UPLOAD_ERR_NO_FILE ' );
103103 }
104104 $ urls = array_unique ($ urls );
105-
105+
106106 $ list = array ();
107107 foreach ($ urls as $ key => $ url ) {
108108 $ img = $ this ->download ($ url , $ config );
@@ -144,7 +144,7 @@ private function download($url, $config)
144144 $ img = new \SplFileInfo ($ pathRes ['path ' ]);
145145 $ original = $ img ->getFilename ();
146146 $ ext = $ img ->getExtension ();
147- $ title = config ( ' ueditor.hash_filename ' ) ? md5 ($ original ) . '. ' . $ ext : $ original ;
147+ $ title = md5 ($ url ) . '. ' . $ ext ;
148148 $ filename = $ this ->formatPath ($ config ['path_format ' ], $ title );
149149 $ info = [
150150 'state ' => 'SUCCESS ' ,
@@ -169,7 +169,7 @@ private function download($url, $config)
169169 }
170170 $ content = stream_get_contents ($ file );
171171 fclose ($ file );
172-
172+
173173 $ info ['file ' ] = $ content ;
174174 $ info ['siez ' ] = strlen ($ content );
175175 return $ info ;
Original file line number Diff line number Diff line change 1919 ],
2020 ],
2121
22- // 是否使用 md5 格式文件名
23- 'hash_filename ' => true ,
24-
2522 // 上传 配置
2623 'upload ' => [
2724 /* 前后端通信相关的配置,注释只允许使用多行方式 */
You can’t perform that action at this time.
0 commit comments