On a recent project, I needed to do a Web-based file upload. On the client side I decided to use plain vanilla HTML and JavaScript, as opposed to a commercial or open source library, or jQuery, or Flash.

On the server side, to accept a file upload and save it, there were also many options. Two leading options for my particular scenario were a PHP handler, and an ASP.NET ASHX handler.

I hadn’t worked with ASHX before. ASHX is a generic handler, meaning it’s very raw and is designed to do general purpose things with an HTTP request from a client, as opposed to being designed to generate a specific kind of a response such as a Web page.

Anyway, I was pleasantly surprised that, even though ASHX scripts do have a certain amount of overkill abstraction that’s common to all ASP.NET technologies, using ASHX was not as bad as I’d feared it’d be.