File: UploadVideo.aspx.cs

package info (click to toggle)
gdata-sharp 2.2.0.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 12,092 kB
  • sloc: cs: 67,781; xml: 38,234; python: 163; makefile: 149; sh: 27
file content (30 lines) | stat: -rw-r--r-- 1,113 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class UploadVideo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void PrintForm()
    {
        String url = HttpContext.Current.Session["form_upload_url"] as string;
        String redirect = HttpContext.Current.Session["form_upload_redirect"] as string;
        url += "?nexturl=" + HttpUtility.UrlEncode(redirect);
        String token = HttpContext.Current.Session["form_upload_token"] as string;
        Response.Write("<form action='"+url+"' method='post' enctype='multipart/form-data'>");
        Response.Write("<input type='file' name='file'/>");
        Response.Write("<input type='hidden' name='token' value='"+token+"'/>");
        Response.Write("<input type='submit' value='Upload'/>");
        Response.Write("</form>");
    }
}