file size limit for downloading using Response.binarywrite

Discussion in 'ASP General' started by S N, Sep 7, 2008.

  1. S N

    S N Guest

    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
     
    S N, Sep 7, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charlie@CBFC
    Replies:
    1
    Views:
    2,844
    Arlyn
    May 13, 2005
  2. Replies:
    1
    Views:
    837
  3. Replies:
    1
    Views:
    1,088
    Victor Bazarov
    Jun 28, 2005
  4. Chris  Ashley
    Replies:
    1
    Views:
    618
    bruce barker
    Oct 2, 2007
  5. S N
    Replies:
    18
    Views:
    800
    Anthony Jones
    Sep 13, 2008
Loading...

Share This Page