DL files through the browser

Results 1 to 2 of 2

Thread: DL files through the browser

  1. #1
    Olz Guest

    Default DL files through the browser

    Has anyone had any expeience of DL files by using <BR>Response.AddHeader("content-disposition=attachment; filename=myfile.txt") ?<BR>The scenario is that a user wants to dl a file, but the request is sent to an asp page which "hides the true location" of the file (we charge for a DL so we don&#039;t want people working out what the URL is (Infact the files are stored outside the WWW root and binary streamed back to the user)<BR>The DL box should then pop up and ask user to save file "myfile.txt". Instead it asks to save file "thispage.asp"<BR>MS docs suggest there is a bug in SP1 IE 5.5<BR> This I can verify - there is! But I have had it working, I just can&#039;t remember how - it involved an elaborate redirection trick but I can;t remember!<BR><BR>In NS - OK - no probs.<BR>In IE (5.5) various probs, but I&#039;ll not spend ages talking about it if noone has any idea what I am on about!<BR>If you HAVE done this before, let me know so I can expand my quesion.<BR><BR>Ta!<BR><BR>Ol.<BR><BR>PS Seeing as "what goes around, comes around", I just answered 8 Qs in the JScript forum - reckon I am due some help now ! ;-) &#060;kiddin!&#062;

  2. #2
    ChristopherN Guest

    Default RE: DL files through the browser

    I played with this scenario for a couple of minutes last week. Without testing it for more than two or three times, I believe that you can get it to work by adding the following line before the line you provided:<BR>Response.ContentType = "application /force-download"<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