<%@ WebHandler Language="C#" Class="AjaxVideoUploader" %>

using System;
using System.Web;

public class AjaxVideoUploader : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        try
        {
            if (context.Request.Files.Count > 0)
            {
                HttpFileCollection files = context.Request.Files;
                foreach (string key in files)
                {
                    HttpPostedFile file = files[key];
                    string fileName = file.FileName;
                    fileName = context.Server.MapPath("uploads/" + fileName);
                    file.SaveAs(fileName);
                }
            }
        }
        catch (Exception ex)
        {
        }
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}