UEditor上传图片等附件都出现红叉

我的环境: vs2010+netframework3.5+ueditor1_3_5-utf8-net

问题:UEditor上传图片等附件都出现红叉

 尝试了网络上各种方法都不对, 后来只能自己看下imageUp.ashx的代码。。。

解决方案:

   默认代码:

  if (!String.IsNullOrEmpty(context.Request.QueryString["fetch"]))
        {
            context.Response.AddHeader("Content-Type", "text/javascript;charset=utf-8");
            context.Response.Write(String.Format("updateSavePath([{0}]);", String.Join(", ", Config.ImageSavePath.Select(x => """ + x + """))));
            return;
        }

  修改为

   

if (!String.IsNullOrEmpty(context.Request.QueryString["fetch"]))
        {
            context.Response.AddHeader("Content-Type", "text/javascript;charset=utf-8");
//分解join方法 
string []str=Config.ImageSavePath.Select(x => """ + x + """).ToArray();
context.Response.Write(String.Format("updateSavePath([{0}]);", String.Join(", ",str ))); return; }

  

   重新生成-刷新-上传图片成功

原文地址:https://www.cnblogs.com/akak123/p/3713522.html