我的环境: 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; }

  

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

相关文章:

  • 2021-06-20
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
  • 2021-07-07
  • 2021-07-08
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案