add clear

This commit is contained in:
2020-08-24 11:49:25 +08:00
parent f1c06d30e1
commit f8724a8c36
+5 -1
View File
@@ -30,8 +30,12 @@ class SecCheck extends SmallProgram
$this->request->setHeader('Content-Type', 'multipart/form-data;charset=UTF-8'); $this->request->setHeader('Content-Type', 'multipart/form-data;charset=UTF-8');
$this->request->setErrorField('errCode'); $this->request->setErrorField('errCode');
$this->request->setErrorMsgField('errMsg'); $this->request->setErrorMsgField('errMsg');
$real_path = new \CURLFile($path);
return $this->request->upload($this->_url . $this->config->getAccessToken(), [ 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()
]); ]);
} }