我的环境: vs2010+netframework3.5+ueditor1_3_5-utf8-net
问题:UEditor上传图片等附件都出现红叉
尝试了网络上各种方法都不对, 后来只能自己看下imageUp.ashx的代码。。。
解决方案:
默认代码:
|
1
2
3
4
5
6 |
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; } |
修改为
|
1
2
3 |
if (!String.IsNullOrEmpty(context.Request.QueryString["fetch"])) { context.Response.AddHeader("Content-Type", "text/javascript;charset=utf-8"); |
|
1 |
//分解join方法 |
|
1 |
string
[]str=Config.ImageSavePath.Select(x => "\""
+ x + "\"")<span style="color: rgb(255, 0, 0);">.ToArray()</span>;<br> context.Response.Write(String.Format("updateSavePath([{0}]);", String.Join(", ",str ))); return; } |
重新生成-刷新-上传图片成功
UEditor上传图片等附件都出现红叉,布布扣,bubuko.com
原文:http://www.cnblogs.com/akak123/p/3713522.html