26 lines
764 B
Plaintext
26 lines
764 B
Plaintext
<%@ WebHandler Language="C#" Class="AyaFileHandler" %>
|
|
|
|
using System;
|
|
using System.Web;
|
|
|
|
public class AyaFileHandler : IHttpHandler, System.Web.SessionState.IReadOnlySessionState
|
|
{
|
|
|
|
public void ProcessRequest (HttpContext context) {
|
|
string idstring = context.Request.QueryString["id"];
|
|
Guid oID = Guid.Empty;
|
|
if (!string.IsNullOrEmpty(idstring))
|
|
oID = new Guid(idstring);
|
|
if (context.Request.QueryString["d"] == "1")
|
|
Util.DeleteAyaFile(context.Response, oID, context.Request.UrlReferrer.ToString());
|
|
else
|
|
Util.WriteAyaFileToResponse(context.Response, oID);
|
|
}
|
|
|
|
public bool IsReusable {
|
|
get {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
} |