I'm using ckeditor on my website (PHP,HTML,JavaScript), and I'd like my users to be able to upload image through the editor, but when I try to do it, the image appears like it's supposed to, then I get an error message in a pop-up saying the image couldn't be uploaded, when I click on the pop-up the image disappear. The weird thing is that the image does get uploaded successfully in the right folder...
Anyone got any idea on how I could fix this?
I don't really know what part of my code I should share, so feel free to ask me.
The problem was inside the script to create the editor:
ClassicEditor.create( document.querySelector( '#editor' ), {
ckfinder: {
uploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images'
},
it seems that ckfinder doesn't automatically return a response to let the editor know the file successfully uploaded, so i had to change it to this:
ClassicEditor.create( document.querySelector( '#editor' ), {
ckfinder: {
uploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images&responseType=json'
},
My bad for not reading the docs correctly
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.