|
@@ -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];
|