可以正常下载啊!
上传代码:

程序代码:
<%
Dim biData, PostData
Size = Request.TotalBytes
biData = Request.BinaryRead(Size)
PostData = BinaryToString(biData,Size)
Dim Exc
If InStr(UCase(PostData),".JPG") > 0 Then
Exc = ".jpg"
ElseIf InStr(UCase(PostData),".GIF") > 0 Then
Exc = ".gif"
ElseIf InStr(UCase(PostData),".PNG") > 0 Then
Exc = ".png"
ElseIf InStr(UCase(PostData),".BMP") > 0 Then
Exc = ".bmp"
Else
Exc = ".xxl"
End If
Dim FileName,Rndum,DateStr,FileFolder
FileFolder="../"&Trim(Request.QueryString("FileFolder"))
Randomize
Rndum = Int((999 * Rnd) + 100)
DateStr = Replace(Replace(Replace(Now(),"-",""),":","")," ","")
FileName = DateStr & Rndum
Set bSourceData = createobject("ADODB.Stream")
bSourceData.Open
bSourceData.Type = 1
bSourceData.Write biData
bSourceData.SaveToFile Server.MapPath(FileFolder&"/"&FileName & Exc),2
Function BinaryToString(biData,Size)
Const adLongVarChar = 201
Set RS = CreateObject("ADODB.Recordset")
RS.Fields.Append "mBinary", adLongVarChar, Size
RS.Open
RS.AddNew
RS("mBinary").AppendChunk(biData)
RS.Update
BinaryToString = RS("mBinary").Value
RS.Close
End Function
上传成功后,图片打开后都是这样:
------------gL6KM7ei4Ef1ei4Ij5Ef1ae0gL6Ij5
Content-Disposition: form-data; name="Filename"
SP_A0503.jpg
------------gL6KM7ei4Ef1ei4Ij5Ef1ae0gL6Ij5
Content-Disposition: form-data; name="Filedata"; filename="SP_A0503.jpg"
Content-Type: application/octet-stream