From f8724a8c36d0fa02c9a6935348ec52b3a3aa4746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 24 Aug 2020 11:49:25 +0800 Subject: [PATCH] add clear --- wchat/qq/SecCheck.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wchat/qq/SecCheck.php b/wchat/qq/SecCheck.php index 6e91b85..955dced 100644 --- a/wchat/qq/SecCheck.php +++ b/wchat/qq/SecCheck.php @@ -30,8 +30,12 @@ class SecCheck extends SmallProgram $this->request->setHeader('Content-Type', 'multipart/form-data;charset=UTF-8'); $this->request->setErrorField('errCode'); $this->request->setErrorMsgField('errMsg'); + + + $real_path = new \CURLFile($path); return $this->request->upload($this->_url . $this->config->getAccessToken(), [ - 'appid' => $this->config->getAppid(), 'media' => $path + 'appid' => $this->config->getAppid(), 'media' => new \CURLFile($path) + , 'form-data[filename]' => $path, 'form-data[content-type]' => $real_path->getMimeType() ]); }