Dim ReadBytes,TrunkBytes,TotalBytes
ReadBytes = 0
TrunkBytes = 12428800 '--分段大小,某位大大经过测试,无组件上传限制单个文件最大约≤65MB
TotalBytes = Request.TotalBytes
If TrunkBytes > TotalBytes Then TrunkBytes = TotalBytes
Version="化境HTTP上传程序 Version 2.0"
set objForm=Server.CreateObject("Scripting.Dictionary")
set objFile=Server.CreateObject("Scripting.Dictionary")
if Request.TotalBytes<1 then Exit Sub
set tStream = Server.CreateObject("adodb.stream")
set Data_5xsoft = Server.CreateObject("adodb.stream")
Data_5xsoft.Type = 1
Data_5xsoft.Mode =3
Data_5xsoft.Open
Do While ReadBytes < TotalBytes
Data_5xsoft.Write Request.BinaryRead(TrunkBytes)
ReadBytes = ReadBytes + TrunkBytes
If (ReadBytes + TrunkBytes) > TotalBytes Then TrunkBytes = TotalBytes mod TrunkBytes '最后剩下的字节
Loop
这种上传办法比较费内存。