var root_url = window.location.protocol+"//"+window.location.host+window.location.pathname; UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl; UE.Editor.prototype.getActionUrl = function(action) { if (action == 'uploadfile') { return root_url+'?/attach_upload/id-files'; } else { return this._bkGetActionUrl.call(this, action); } }
覆盖ueditor原生的上传方法,改为自己的后台方法,但要注意返回值格式要与ueditor要求的一致
ueditor自定义上传附件方法
最新推荐文章于 2024-06-26 18:00:54 发布