Downloadable file(s) via ASP Gateway

Results 1 to 2 of 2

Thread: Downloadable file(s) via ASP Gateway

  1. #1
    Alabin Guest

    Default Downloadable file(s) via ASP Gateway

    I need to enable user to Download file(uploaded to server as an Attachment)via ASP gateway. What changes in Response-Header should be made,so that it causes browser to recognise response as an attachment? <BR>I&#039ve tried this:<BR>Response.AddHeader "contentdisposition","attachment:filename=" & filename<BR>Response.AddHeader "content-type",contentType<BR>Response.AddHeader "content-length", Content_Length<BR><BR>Thank you,<BR>

  2. #2
    Otto Rotto Guest

    Default RE: Downloadable file(s) via ASP Gateway

    Response.Buffer=true<BR><BR>set objFSO=server.CreateObject("Scripting.FileSystemOb ject")<BR>set objF=objFSO.OpenTextFile(Path_To_file,1,0)<BR>Do while not objF.AtEndOfStream<BR> BinArray = BinArray & chrB(asc(objF.Read(1)))<BR>Loop<BR> objF.Close<BR> Response.Clear<BR> response.AddHeader "Connection","keep-alive"<BR> response.AddHeader "Content-Disposition","attachment; filename=" & filename <BR> Response.AddHeader "Accept-Ranges","bytes"<BR> Response.ContentType = contentType<BR> Response.CacheControl = "public"<BR> Response.BinaryWrite BinArray<BR> Response.End

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts