게시판 글쓰기시 에디터에서 이미지 첨부 안됨

CKEditor, CKEditor 5, smarteditor2
글쓰기 세션과 에디터 업로드 세션의 문제인것 같음
아래 두가지 방법으로 임시로 해결???(참고만 해주세요.)
첫번째 방법 - /app/common.php 파일 377Line 아래에 아래코드 추가
unset($_SESSION);
define('G5_SESSION_NAME', 'G5SE_FIXED_SESSID');
session_name('G5SE_FIXED_SESSID');
두번째 방법
라우터에 주소 등록 - smarteditor2기준(ckeditor4, ckeditor5도 같은 방식???)
- /app/router.php 파일의 $cleanRoutes배열에 아래 코드 추가
'/api/editor/upload' => 'plugin/editor/smarteditor2/photo_uploader/popup/php/index.php',
- /app/plugin/editor/smarteditor2/photo_uploader/popup/js/basic.js파일에서 20Line 코드를 아래코드로 변경
url: '/api/editor/upload?_nonce=' + ed_nonce,
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 2개
올려주신 코드 참고하여 기존 URL 과 호환이 되도록 모든 에디터의 업로드 문제를 해결했습니다
CKEditor4 (기본 에디터)
SmartEditor2
CHEditor5
https://github.com/gnuboard/g5se/releases/tag/v0.1.15
감사합니다