wupengfei 2 years ago
parent
commit
0549f307f1
3 changed files with 4 additions and 4 deletions
  1. 2 1
      .idea/workspace.xml
  2. 0 1
      application/api/controller/Upload.php
  3. 2 2
      application/common.php

+ 2 - 1
.idea/workspace.xml

@@ -4,6 +4,7 @@
     <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" />
+      <change beforePath="$PROJECT_DIR$/application/common.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/common.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -270,7 +271,7 @@
       <workItem from="1679532313623" duration="31448000" />
       <workItem from="1679619041819" duration="29965000" />
       <workItem from="1679706054685" duration="19035000" />
-      <workItem from="1679878121007" duration="11312000" />
+      <workItem from="1679878121007" duration="11372000" />
     </task>
     <servers />
   </component>

+ 0 - 1
application/api/controller/Upload.php

@@ -125,7 +125,6 @@ class Upload extends Base
         if (is_array($info) && isset($info['url'])) {
             $url = $this->safe ? $name : $info['url'];
             $pdf_url = pdfCurl($url);
-            var_dump($pdf_url);die();
             $this->success('上传成功',['url'=>$url,'pdf_url'=>$pdf_url['data']]);
         } else {
             $this->error('文件处理失败,请稍候再试!');

+ 2 - 2
application/common.php

@@ -345,9 +345,9 @@ function pdfCurl($file_name)
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
     curl_setopt($ch, CURLOPT_POST, 1);
 //    curl_setopt($ch, CURLOPT_POSTFIELDS, 'file=@'.$file_name);
-    //var_dump( ['file'=>new \CURLFile(realpath($file_name))]);die();
+    var_dump( ['file'=>new \CURLFile(realpath($file_name))]);die();
   //  curl_setopt($ch, CURLOPT_POSTFIELDS, ['file'=>new \CURLFile(realpath($file_name))]);
-    curl_setopt($ch, CURLOPT_POSTFIELDS, ['file'=>$file_name]);
+   // curl_setopt($ch, CURLOPT_POSTFIELDS, ['file'=>$file_name]);
     $headers = array();
 
 //    $headers[] = 'Content-Type: application/x-www-form-urlencoded';