output = $handle->copy(); unset($this->output['file']); } } public function copy($file, $key = 1) { $image['file'] = $file; $image['key'] = $key; $handle = new Handle($image); $this->output = $handle->copy(); unset($this->output['file']); return $this->output; } public function action_api() { Dever::outDiy($this->output); } public function start_api() { Dever::outDiy($this->output); } public function drag_api() { 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() { 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() { if ($this->output['status'] == 1) { $this->output['state'] = true; } else { $this->output['state'] = false; } $this->output['file_path'] = $this->output['url']; Dever::outDiy($this->output); } public function kindeditor_api() { if ($this->output['status'] == 1) { $this->output['error'] = 0; } else { $this->output['error'] = 1; $this->output['message'] = $this->output['message']; } $this->output['url'] = $this->output['url']; Dever::outDiy($this->output); } }