Browse Source

更新 'app/Http/Controllers/V1/Ai/AiController.php'

qiang 10 months ago
parent
commit
eb7c877a08
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Http/Controllers/V1/Ai/AiController.php

+ 1 - 1
app/Http/Controllers/V1/Ai/AiController.php

@@ -600,7 +600,7 @@ class AiController extends Controller
         if (false !== $imageContent) {
         if (false !== $imageContent) {
             $savedImages = file_put_contents($imagePath, $imageContent);
             $savedImages = file_put_contents($imagePath, $imageContent);
             if (false !== $savedImages) {
             if (false !== $savedImages) {
-                return $_SERVER['HTTP_HOST'] . '/file/sd/' . date('Ymd') . '/' . $imageName;
+                return request()->getHost(). '/file/sd/' . date('Ymd') . '/' . $imageName;
             }
             }
             return false;
             return false;
         }
         }