Browse Source

filesystem class

zhangdehua 11 months ago
parent
commit
bac81b0273
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/store/controller/Upload.php

+ 3 - 1
app/store/controller/Upload.php

@@ -75,7 +75,9 @@ class Upload extends Controller
         $storage = new StorageClient(['projectId' => 'dihua-01', 'keyFilePath' => $keyFilePath]);
         $bucket = $storage->bucket('freeshippingvps');
 
-        $filePath = config('app.app_host') . '/uploads/' . $fileInfo['file_path'];
+        //$filePath = config('app.app_host') . '/uploads/' . $fileInfo['file_path'];
+        $filePath = '/etc/nginx/nginx/html/vape_shop/public/uploads/' . $fileInfo['file_path'];
+
         Log::error($filePath);
         $storageObj = $bucket->upload(
             fopen($filePath, 'r'),