471,049 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,049 software developers and data experts.

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 1485

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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.