Link alias

Discussion in 'ASP General' started by sdybvik, Jul 30, 2003.

  1. sdybvik

    sdybvik Guest

    To secure files on a site with authentication we have put the
    attachments in a folder outside the IIS web site like this:

    D:\Documents\<ItemID>\filename.doc

    where ItemID is a number which we use to check permissions inside our
    application.

    In order to download the file from the site we have made a binary
    reader component (we could probably use SAFileUp or something instead,
    but this works) to send the file through an ASP-file:

    http://mysite/Docs/ShowDoc.asp?ID=<ItemID>

    This works well.

    So to my problem:
    If I right click the link to save the file on my local computer (Save
    target as), it will save the file properly, but the filename in the
    Save As-dialog is ShowDoc.asp. I want it to be filename.doc instead.
    Is it possible?

    I've heard that on a Apache web server you can write the link like
    this:

    http://mysite/something/filename.doc?ID=<ItemID>

    but then the server knows that it's
    http://mysite/Docs/ShowDoc.asp?ID=<ItemID> it should load. If this is
    possible in IIS, the Save As-problem will be solved. Hopefully.
    sdybvik, Jul 30, 2003
    #1
    1. Advertising

  2. sdybvik

    Ray at Guest

    The method described here should work and will allow you to specify a
    filename. The filename that's used in the physical path on the server does
    not have to be what is used in the filename value in the header that you
    return, I believe.

    http://www.aspfaq.com/show.asp?id=2161

    Ray at work

    "sdybvik" <> wrote in message
    news:...
    > http://mysite/Docs/ShowDoc.asp?ID=<ItemID>
    >
    > This works well.
    >
    > So to my problem:
    > If I right click the link to save the file on my local computer (Save
    > target as), it will save the file properly, but the filename in the
    > Save As-dialog is ShowDoc.asp. I want it to be filename.doc instead.
    > Is it possible?
    >
    Ray at, Jul 30, 2003
    #2
    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. Khashishi
    Replies:
    3
    Views:
    5,606
    Weng Tianxiang
    Sep 22, 2004
  2. =?ISO-8859-15?Q?Stefan_Schw=E4rzler?=

    what's incorrect ALIAS

    =?ISO-8859-15?Q?Stefan_Schw=E4rzler?=, Aug 3, 2005, in forum: VHDL
    Replies:
    1
    Views:
    453
    Jonathan Bromley
    Aug 4, 2005
  3. TigerJade
    Replies:
    4
    Views:
    488
    Jonathan Bromley
    Aug 5, 2005
  4. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    794
    Kevin Spencer
    May 17, 2005
  5. grocery_stocker
    Replies:
    9
    Views:
    733
    grocery_stocker
    May 24, 2008
Loading...

Share This Page