$v) { $send['file'] = $v; $handle = new Handle($send); $output = $handle->copy(); unset($output['file']); $this->output[] = $output; } } else { $handle = new Handle($image); $this->output = $handle->copy(); unset($this->output['file']); } } } public function copy($file = false, $key = 1, $state = false) { if (Dever::input('file') && $state == false) { $this->upload(); Dever::outDiy($this->output); } else { $image['file'] = $file; $image['key'] = $key; $handle = new Handle($image); $this->output = $handle->copy(); unset($this->output['file']); return $this->output; } } public function copys($file, $key = 1) { $file = urldecode($file); $file = explode(',', $file); foreach ($file as $v) { $copy = $this->copy($v, $key, true); if (isset($copy['url'])) { $result[] = $copy['url']; } else { $result[] = ''; } } return implode(',', $result); } public function action_api() { $this->upload(); Dever::outDiy($this->output); } public function start_api() { $this->upload(); Dever::outDiy($this->output); } public function drag_api() { $this->upload(); if ($this->output['status'] == 1) { $this->output['filename'] = $this->output['url']; } else { $this->output['error'] = $this->output['message']; } Dever::outDiy($this->output); } public function ueditor_api() { $this->upload(); if ($this->output['status'] == 1) { $this->output['state'] = 'SUCCESS'; $this->output['original'] = 1; } else { $this->output['url'] = ''; $this->output['fileType'] = 1; $this->output['original'] = 1; $this->output['state'] = $this->output['message']; } Dever::outDiy($this->output); } public function simditor_api() { $this->upload(); if ($this->output['status'] == 1) { $this->output['state'] = true; $this->output['file_path'] = $this->output['url']; } else { $this->output['state'] = false; } Dever::outDiy($this->output); } public function kindeditor_api() { $this->upload(); if ($this->output['status'] == 1) { $this->output['error'] = 0; $this->output['url'] = $this->output['url']; } else { $this->output['error'] = 1; $this->output['message'] = $this->output['message']; } Dever::outDiy($this->output); } }