wupengfei 2 年之前
父节点
当前提交
0bcd7c8bf7
共有 2 个文件被更改,包括 2 次插入3 次删除
  1. 0 1
      .idea/workspace.xml
  2. 2 2
      application/api/controller/Upload.php

+ 0 - 1
.idea/workspace.xml

@@ -2,7 +2,6 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
-      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/application/api/controller/Upload.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Upload.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />

+ 2 - 2
application/api/controller/Upload.php

@@ -93,10 +93,10 @@ class Upload extends Base
         if ($file->checkExt('php,sh')) {
             $this->error('可执行文件禁止上传到本地服务器!');
         }
-        var_dump($file);
+        var_dump($file->getRealPath());
         $headers = [];
         $headers[] = 'Content-Type: application/x-www-form-urlencoded';
-        $res = requestPost('http://101.132.128.55:9999/v1/pdf/upload',json_encode($file),$headers);
+        $res = requestPost('http://101.132.128.55:9999/v1/pdf/upload',['file'=>$file->getRealPath()],$headers);
         var_dump($res);