S
SushiSean
Hello. I have simple file handler.
public void ProcessRequest (HttpContext context)
{
context.Response.WriteFile(FullRealPath);
}
it works but not correct. if I am tring WriteFile some zip or mp3 in browser
open it as a text! As I know I need send correct ContentType. Something like
this
context.Response.ContentType = "image/jpeg";
but how I can found this param for any file? it can be image, text, zip, mp3
anthing.... Exist any way get content type basical on exist file?
public void ProcessRequest (HttpContext context)
{
context.Response.WriteFile(FullRealPath);
}
it works but not correct. if I am tring WriteFile some zip or mp3 in browser
open it as a text! As I know I need send correct ContentType. Something like
this
context.Response.ContentType = "image/jpeg";
but how I can found this param for any file? it can be image, text, zip, mp3
anthing.... Exist any way get content type basical on exist file?