I tried the official upload command, but it's not working.
This is the CKEditor part
<CKEditor
placeholder="write"
editor={ClassicEditor}
data={this.state.body}
/* config={{ckfinder: {
// Upload the images to the server using the CKFinder QuickUpload command.
uploadUrl: 'https://example.com/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images&responseType=json'
}}} */
onReady={(editor) => {
// You can store the "editor" and use when it is needed.
console.log("Editor is ready to use!", editor);
}}
onChange={(event, editor) => {
const data = editor.getData();
this.setState({ body: data });
}}
/>
After inserting this, I can upload a picture, but a message pops up with the following:
The console displays this error
Access to XMLHttpRequest at 'https://example.com/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images&responseType=json' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. example.com/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images&responseType=json:1
Failed to load resource: net::ERR_FAILED