|
@@ -71,6 +71,35 @@ class Upload extends Base
|
|
|
$this->error('文件处理失败,请稍候再试!');
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @title 文件上传
|
|
|
+ * @desc 个人信息
|
|
|
+ * @author qc
|
|
|
+ * @url /api/upload/upload
|
|
|
+ * @method GET||POST
|
|
|
+ * @tag
|
|
|
+ * @param name:file require:1 desc:文件名
|
|
|
+ *
|
|
|
+ */
|
|
|
+ public function pdfUpload()
|
|
|
+ {
|
|
|
+ if (!($file = $this->getUploadFile()) || empty($file)) {
|
|
|
+ $this->error('文件上传异常,文件可能过大或未上传!');
|
|
|
+ }
|
|
|
+ if (!$file->checkExt(strtolower(sysconf('storage_local_exts')))) {
|
|
|
+ $this->error('文件上传类型受限,请在后台配置!');
|
|
|
+ }
|
|
|
+ if ($file->checkExt('php,sh')) {
|
|
|
+ $this->error('可执行文件禁止上传到本地服务器!');
|
|
|
+ }
|
|
|
+ $res = requestPost('http://101.132.128.55:9999/v1/pdf/upload',$file);
|
|
|
+ var_dump($res);
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 获取本地文件对象
|
|
|
* @return \think\File
|