i am inplementing an intranet using asp 3.0 with vbscript. i want to know how to make my webserver download a file on the client.the file is grater than 60 mb.
i have a script which does not download a file greater than 4mb.
Dim Stream
Dim Contents
Dim FileName
Dim FileExt
Const adTypeBinary = 1
FileName = Rec("file_path")
if FileName = "" Then
Response.Write "Filename Not specified."
Response.End
End if
FileExt = Mid(FileName, InStrRev(FileName, ".") + 1)
Select Case UCase(FileExt)
Case "ASP", "ASA", "ASPX", "ASAX", "MDB"
Response.Write "Protected file Not allowed."
Response.End
End Select
' Download the file
Response.Clear
response.Buffer=true
Response.ContentType = "application/octet-stream"
Response.AddHeader "content-disposition", "attachment; filename=" & FileName
Set Stream = server.CreateObject("ADODB.Stream")
Stream.Type = adTypeBinary
Stream.Open
Stream.LoadFromFile Server.MapPath(FileName)
While Not Stream.EOS
Response.BinaryWrite Stream.Read(1024*64)
Wend
Stream.Close
Set Stream = Nothing
Response.Flush
Response.End
Any ideas how to get this to work.