string result = string.Empty;
string file = Server.MapPath(string.Format(@"File/{0}/{1}", folder, filename));
if (File.Exists(file) == true)
{
string wsUrl = System.Web.HttpContext.Current.Request.Url.ToString();
wsUrl = wsUrl.Substring(0, wsUrl.LastIndexOf('/') + 1);
wsUrl = wsUrl.Trim('/') + "/" + string.Format(@"File/{0}/{1}", folder, filename);
result = wsUrl;
}
return result;
URL文件地址下载
最新推荐文章于 2024-06-22 17:10:11 发布