Topic: Plupload Handler in ASP .net

can any body tell me how to write server side handler of plupload in ASP.net
has any body written it can he/she share it please i need it urgent thanks in advance

Re: Plupload Handler in ASP .net

piece of code to process plupload requests in vb.net assuming unique_names setting set:

Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
        Try
            Dim name As String = context.Request("name")
            Dim chunk As String = context.Request("chunk")
            Dim chunks As String = context.Request("chunks")
            If context.Request.Files.Count > 0 And name <> "" Then
                Dim fs As New FileStream(context.Server.MapPath("TempFiles/" & name), IIf(chunk <> "" AndAlso CInt(chunk) > 0, FileMode.Append, FileMode.Create))
                Dim postedFile As HttpPostedFile = context.Request.Files(0)
                Dim buffer(1023) As Byte
                Dim count As Integer = buffer.Length
                Do
                    count = postedFile.InputStream.Read(buffer, 0, count)
                    If count = 0 Then Exit Do
                    fs.Write(buffer, 0, count)
                Loop
                fs.Close()
                fs.Dispose()
            End If

        Catch ex As Exception
            context.Response.Write("error|" & ex.Message)
        End Try
    End Sub

Re: Plupload Handler in ASP .net

Can you add comments to this code because i dont know vb .net or can u convert it in c sharp

Re: Plupload Handler in ASP .net

google: "vb net to c# converter"