file size limit for downloading using Response.binarywrite

S

S N

I am using the following code to hide the download url of files on my website. The code uses Response.Binarywrite to send file to the client.
Kindly indicate the maximum size of the file that can be downloaded using this method.
I am hosting this site on a public server, so I will not be able to change anything on the webserver. Kindly indicate what can be done to ensure that the above method remains valid for any file size download.

call Response.AddHeader("Content-Disposition","attachment; filename=""" & strFileSave & """")
Response.ContentType = "bad/type"
Set Fsys = Server.CreateObject("Scripting.FileSystemObject")
Set TS = Fsys.GetFile(strFile).OpenAsTextStream(1, -1)
Do While Not (TS.AtEndOfStream)
Response.BinaryWrite(TS.Read(1))
Loop
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top