File Downloading

Results 1 to 2 of 2

Thread: File Downloading

  1. #1
    Join Date
    Dec 1969

    Default File Downloading

    This script will force the download dialog box for any file on the server. But I need it to work for a file that not on the server, I want to be able to give a web path. heres the code<BR><BR>&#060;%@Language=Jscript%&#062;<BR>&#0 60;%<BR>// forcing download<BR>var sFileName = Request.QueryString("filename")<BR>var objStream = new ActiveXObject("ADODB.Stream");<BR>objStream.Type = 1;<BR>objStream.Open(); <BR>objStream.loadFromFile("");<BR><BR>Response.ContentType = &#039;application/unknown&#039;;<BR>Response.addHeader(&#039;content-disposition&#039;, &#039;attachment;filename=blue&#039;);<BR>Response .BinaryWrite(;<BR>%&#062;<BR><BR> See how I use a web address to open the file, its not working, it says file cannot be opened, is there any way I can do this?

  2. #2
    Join Date
    Dec 1969

    Default RE: File Downloading

    first of all you&#039;d need to get the file from the remote server. ADODB.Stream doesn&#039;t support HTTP. try XMLHTTP<BR><BR>though why can&#039;t you move the file to your own server?<BR><BR><BR>j<BR>

Posting Permissions

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