正在显示
1 个修改的文件
包含
4 行增加
和
3 行删除
| @@ -169,15 +169,16 @@ public function uploadVerifyFile(Request $request) | @@ -169,15 +169,16 @@ public function uploadVerifyFile(Request $request) | ||
| 169 | { | 169 | { |
| 170 | $domain = $request->getHost(); | 170 | $domain = $request->getHost(); |
| 171 | $files = $request->allFiles(); | 171 | $files = $request->allFiles(); |
| 172 | + $path = $request->input('path', ''); | ||
| 172 | $file_name = ''; | 173 | $file_name = ''; |
| 173 | foreach ($files as $file) { | 174 | foreach ($files as $file) { |
| 174 | - $destinationPath = public_path($domain); | 175 | + $destinationPath = public_path($domain . $path); |
| 175 | $file->move($destinationPath, $file->getClientOriginalName()); | 176 | $file->move($destinationPath, $file->getClientOriginalName()); |
| 176 | $filePath = $destinationPath . '/' . $file->getClientOriginalName(); | 177 | $filePath = $destinationPath . '/' . $file->getClientOriginalName(); |
| 177 | @file_put_contents(storage_path('logs/upload_file.log'), date('Y-m-d H:i:s') . " " . $filePath . PHP_EOL, FILE_APPEND); | 178 | @file_put_contents(storage_path('logs/upload_file.log'), date('Y-m-d H:i:s') . " " . $filePath . PHP_EOL, FILE_APPEND); |
| 178 | $file_name = $file->getClientOriginalName(); | 179 | $file_name = $file->getClientOriginalName(); |
| 179 | } | 180 | } |
| 180 | - if ($file_name) { | 181 | + if ($file_name && empty($path)) { |
| 181 | $transmitUrl = env("TRANSMIT_URL"); | 182 | $transmitUrl = env("TRANSMIT_URL"); |
| 182 | $this->httpPost($transmitUrl . "api/selfSiteVerify/", json_encode(['file_name' => $file_name, 'type' => 1])); | 183 | $this->httpPost($transmitUrl . "api/selfSiteVerify/", json_encode(['file_name' => $file_name, 'type' => 1])); |
| 183 | } | 184 | } |
| @@ -260,7 +261,7 @@ public function websiteHtml(Request $request) | @@ -260,7 +261,7 @@ public function websiteHtml(Request $request) | ||
| 260 | "zip_count" => $zip_count | 261 | "zip_count" => $zip_count |
| 261 | ]; | 262 | ]; |
| 262 | $info = json_encode($info); | 263 | $info = json_encode($info); |
| 263 | - Redis::lpush(env('REDIS_NAME','handle_html'), $info); | 264 | + Redis::lpush(env('REDIS_NAME', 'handle_html'), $info); |
| 264 | return $this->success(); | 265 | return $this->success(); |
| 265 | } | 266 | } |
| 266 | 267 |
-
请 注册 或 登录 后发表评论