468,761 Members | 1,802 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,761 developers. It's quick & easy.

How to download file graeter than 60mb form my webserver

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."
End if

FileExt = Mid(FileName, InStrRev(FileName, ".") + 1)
Select Case UCase(FileExt)
Case "ASP", "ASA", "ASPX", "ASAX", "MDB"
Response.Write "Protected file Not allowed."
End Select
' Download the file
Response.ContentType = "application/octet-stream"

Response.AddHeader "content-disposition", "attachment; filename=" & FileName
Set Stream = server.CreateObject("ADODB.Stream")
Stream.Type = adTypeBinary
Stream.LoadFromFile Server.MapPath(FileName)
While Not Stream.EOS
Response.BinaryWrite Stream.Read(1024*64)
Set Stream = Nothing

Any ideas how to get this to work.
Sep 14 '06 #1
0 1437

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Matthew Sims | last post: by
4 posts views Thread by news | last post: by
4 posts views Thread by tma | last post: by
6 posts views Thread by Jatin | last post: by
reply views Thread by Mahesha | last post: by
2 posts views Thread by jwf | last post: by
2 posts views Thread by cburkhar | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.