日期:2014-05-17 浏览次数:20505 次
protected void but_go_Click(object sender, EventArgs e)
{
var content = txtcontent.Value;//富文本内容
string _localSavedir = "/upload/content/RemoteImg"; //相对路径保存的图片
string _PhylocalSavedir = Server.MapPath(_localSavedir);
var sp_content = getRemoteContent(content, _localSavedir, _PhylocalSavedir, "", true);
}
/// <summary>
/// 远程存图
/// </summary>
/// <param name="_Content">富文本内容</param>
/// <param name="_localSavedir">相对路径</param>
/// <param name="_PhylocalSavedir">服务器绝对路径</param>
/// <param name="o1">默认为空</param>
/// <param name="ReminTF">是否重命名</param>
/// <returns></returns>
private string getRemoteContent(string _Content, string _localSavedir, string _PhylocalSavedir, string o1, bool ReminTF)
{
var ts = new ts_content();
ts.RemoteResource(_Content, _localSavedir, _PhylocalSavedir, "", ReminTF);
ts.FileExtends = new string[] { "gif", "jpg", "bmp", "ico", "png", "jpeg", "swf", "rar", "zip", "cab", "doc", "rm", "ram", "wav", "mid", "mp3", "avi", "wmv" };
ts.FetchResource();
return ts.Content;
}