CKEditor 5图片上传怎么做? [英] How to do CKEditor 5 Image Uploading?
本文介绍了CKEditor 5图片上传怎么做?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
ClassicEditor
.create( editorElement, {
ckfinder: {
uploadUrl: 'my_server_url'
}
} )
.then( ... )
.catch( ... );
我的服务器响应是什么?我在后端使用Java。
无论我的响应是什么,它都会抛出一个无法上传文件对话框。
What should be my server response? I am using Java in the backend. Whatever my response is, it throws a dialog box 'cannot upload file'.
推荐答案
成功响应:
{
"uploaded": true,
"url": "http://127.0.0.1/uploaded-image.jpeg"
}
故障响应:
{
"uploaded": false,
"error": {
"message": "could not upload this image"
}
}
这篇关于CKEditor 5图片上传怎么做?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文