We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why this is not working ? I wanna upload img summernote on folder where is ID - POST ...
I will try $id, $rows['id'] - always i have code " /169160a0-693f-489c-b5cb-0b979cb4aa68"
/** * image upload from WYSIWYG */ public function postEditorUpload($id = null) { header('Content-type: application/json'); $rows = $this->db('blog')->where('id', $id)->oneArray(); $dir = $this->_uploads.'/'.$rows['id']; $error = null; if (!file_exists($dir)) { mkdir($dir, 0777, true); } if (isset($_FILES['file']['tmp_name'])) { $img = new \Inc\Core\Lib\Image; if ($img->load($_FILES['file']['tmp_name'])) { $imgPath = $dir."/".time().'.'.$img->getInfos('type'); $img->save($imgPath); echo json_encode(['status' => 'success', 'result' => url($imgPath)]); } else { $error = $this->lang('editor_upload_fail'); } if ($error) { echo json_encode(['status' => 'failure', 'result' => $error]); } } exit(); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Why this is not working ?
I wanna upload img summernote on folder where is ID - POST ...
I will try $id, $rows['id'] - always i have code " /169160a0-693f-489c-b5cb-0b979cb4aa68"
The text was updated successfully, but these errors were encountered: