You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
using Swift.web.Library; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Web;
namespace Swift.web.AgentNew { /// <summary>
/// Summary description for GetIdPictureView
/// </summary>
public class GetIdPictureView : IHttpHandler {
public void ProcessRequest(HttpContext context) { var imageName = context.Request.QueryString["fileName"]; var imgPath = GetStatic.GetAppRoot() + @"\Images\na.gif"; if (imageName == "" || imageName == null || imageName.Split('_').Length < 3) { context.Response.WriteFile(imgPath); } else { var fileName = context.Request.QueryString["fileName"]; var user = context.Request.QueryString["createdBy"];
imgPath = GetStatic.GetCustomerFilePath() + "CustomerDocument\\" + "ID Collection\\" + user +"\\"+ fileName; if (File.Exists(imgPath)) { context.Response.ContentType = imgPath; } else { context.Response.ContentType = GetStatic.ReadWebConfig("root", "") + "Images\\na.gif"; } } context.Response.WriteFile(context.Response.ContentType); }
public bool IsReusable { get { return false; } } } }
|