ueditor上傳附件顯示伺服器傳回錯誤
ueditor上傳附件顯示伺服器傳回錯誤
ueditor上傳附件顯示伺服器傳回錯誤,
百度了很多,基本是json錯誤的原因,可是我将我的json字元串線上轉是可以的
後來将
response.getWriter().print("{'url':'" + up.getUrl() + "','fileType':'" + up.getType() + "','title':'" + up.getOriginalName() + "'," +
"'state':'" + up.getState() + "','original':'" + up.getOriginalName() + "'}");
改為下列就好了
response.getWriter().print("{\"url\":\"" + up.getUrl() + "\",\"fileType\":\"" + up.getType() + "\",\"title\":\"" + up.getOriginalName() + "\"," +
"\"state\":\"" + up.getState() + "\",\"original\":\"" + up.getOriginalName() + "\"}");
花了好多時間解決,沒想到最後這麼簡單。還是記錄一下,謹記!
ueditor上傳附件顯示伺服器傳回錯誤相關教程