wesmiler 2 yıl önce
ebeveyn
işleme
a0a8da5d3b
2 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 1 1
      app/Helpers/common.php
  2. 2 2
      app/Services/Api/VideoService.php

+ 1 - 1
app/Helpers/common.php

@@ -1932,7 +1932,7 @@ if (!function_exists('upload_video')) {
         // 重命名保存
         $path = $file->move($file_dir, $file_name);
         // 文件临时路径
-        $file_path = str_replace(IMG_PATH, '', $file_dir) . '/' . $file_name;
+        $file_path = str_replace(ATTACHMENT_PATH, '', $file_dir) . '/' . $file_name;
 
         // 返回结果
         $result = [

+ 2 - 2
app/Services/Api/VideoService.php

@@ -370,8 +370,8 @@ class VideoService extends BaseService
         if($type == 1) {
             if($fileUrl){
                 $result = upload_video($request,'video');
-                var_dump($result);
-                $fileUrl = isset($result['file_path'])? $result['file_path'] : '';
+                $data = isset($result['data'])? $result['data'] : [];
+                $fileUrl = isset($data['file_path'])? $data['file_path'] : '';
                 if(empty($fileUrl)){
                     $this->error = 2212;
                     return false;