更新图片上传
This commit is contained in:
parent
eb79169226
commit
38fc6e4850
|
@ -47,6 +47,9 @@ class UploadController extends BaseAdminController
|
|||
public function taskImage(): Json
|
||||
{
|
||||
$params=$this->request->post();
|
||||
if (empty($_FILES['file'])) {
|
||||
return $this->fail('请上传图片');
|
||||
}
|
||||
$result = curl_post_file(env('project.worker_domain').'/middleapi/upload/image', $_FILES['file']['tmp_name'], $_FILES['file']['name'], $_FILES['file']['type'],$this->reqHeader);
|
||||
if($result['code'] == 0){
|
||||
return $this->fail($result['msg']);
|
||||
|
@ -58,6 +61,9 @@ class UploadController extends BaseAdminController
|
|||
public function taskFile(): Json
|
||||
{
|
||||
$params=$this->request->post();
|
||||
if (empty($_FILES['file'])) {
|
||||
return $this->fail('请上传图片');
|
||||
}
|
||||
$result = curl_post_file(env('project.worker_domain').'/middleapi/upload/file', $_FILES['file']['tmp_name'], $_FILES['file']['name'], $_FILES['file']['type'],$this->reqHeader);
|
||||
if($result['code'] == 0){
|
||||
return $this->fail($result['msg']);
|
||||
|
|
Loading…
Reference in New Issue