Browse Source

修改文件上传

chenxiqiang 6 years ago
parent
commit
a952f54eed
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      manage-server/app/Http/Controllers/CommonController.php

+ 2
- 1
manage-server/app/Http/Controllers/CommonController.php View File

@@ -61,9 +61,10 @@ class CommonController extends Controller
61 61
                 $name = "photos" . $extension;
62 62
 
63 63
                 $store_result = Storage::putFile('public', $photo, 'public');
64
+                $http_path = asset(str_replace('public', 'storage', $store_result));
64 65
                 return response()->json([
65 66
                     'status' => 0,
66
-                    'path' => $store_result
67
+                    'path' => $http_path
67 68
                 ]);
68 69
             } else {
69 70
                 return response()->json([

Loading…
Cancel
Save