<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Upload.aspx.cs" Inherits="FileDropAspNetScript.Upload" %> <%@ Import Namespace="System.Security.Cryptography" %> <% /*! FileDrop Revamped - server-side upload handler sample in public domain | http://filedropjs.org *** This is an example of server-side script that handles both AJAX and IFrame uploads. AJAX upload provides raw file data as POST input while IFrame is a POST request with Request.Files member set. Result is either output as HTML with JavaScript code to invoke the callback (like JSONP) or in plain text if none is given (it's usually absent on AJAX). */ // Callback name is passed if upload happens via iframe, not AJAX (FileAPI). string callback = Request.Form["fd-callback"]; string name; byte[] data; // Upload data can be POST'ed as raw form data or uploaded via