Explorar o código

去掉文档预览的js引用

zmw hai 8 meses
pai
achega
c1b5944741
Modificáronse 1 ficheiros con 11 adicións e 6 borrados
  1. 11 6
      app/common/controller/Api.php

+ 11 - 6
app/common/controller/Api.php

@@ -620,13 +620,18 @@ class Api extends BaseController {
             case "application/zip":
             case "application/x-rar-compressed":
             case "application/x-7z-compressed":
-                if (in_array($type, [ProjectState::JBT])) {
-                    $filestd = $upload->uploadOne($file, "hybrid", "talent_files");
-                } else {
-                    $res = ["msg" => "不支持的附件类型", "obj" => $index];
-                    echo sprintf("<script>parent.%s(%s);</script>", $backName, json_encode($res));
-                    exit();
+                if(!in_array($file->extension(),['zip','7z','rar'])){
+                    $filestd = $upload->uploadOne($file, "file", "talent_files");
+                }else{
+                    if (in_array($type, [ProjectState::JBT])) {
+                        $filestd = $upload->uploadOne($file, "hybrid", "talent_files");
+                    } else {
+                        $res = ["msg" => "不支持的附件类型", "obj" => $index];
+                        echo sprintf("<script>parent.%s(%s);</script>", $backName, json_encode($res));
+                        exit();
+                    }
                 }
+
                 break;
             default:
                 $res = ["msg" => "不支持的附件类型", "obj" => $index];