Hi,
I can give you an asp.net backend solution with one restriction. Until now, i was not able to correctly catch all of the octet-stream chunks. If you change the component to upload all in one chunk and raise the upload-limit (maxrequestlength) it works fine.
Step 1:
Modifiy web.config to raise the upload limit:
<system.web>
<httpRuntime maxRequestLength="40960" /> <!--40960 = 40 MB-->
</system.web>
Step 2:
Remove the "chunk_size" option in your javascript-code.
Step 3:
Build a Backend-Page (for example upload.aspx)
Add the following Code to upload.aspx.vb:
Dim chunk As Integer = Request.QueryString("chunk")
Dim chunks As Integer = Request.QueryString("chunks")
Dim name As String = Request.QueryString("name")
name = name.Replace("/", "").Replace("'", "").Replace("\", "")
Dim filename As String = Request.PhysicalApplicationPath + "upload/" + name
If Request.ContentType = "application/octet-stream" Then
If (Request.ContentLength > 0) Then
Dim buffer As Byte()
Dim br As New BinaryReader(Request.InputStream)
buffer = br.ReadBytes(br.BaseStream.Length)
br.Close()
Dim binWriter As New BinaryWriter(File.Open(filename, FileMode.Create))
binWriter.Write(buffer)
binWriter.Close()
End If
End If
As soon as i found out how to handle the chunks i will post a new code example.
A big thank to the plupload developers. This component ist great stuff.
Regards
Reto
Last edited by chase (2010-06-20 21:13:07)