how to send binary files and protect their file names

Discussion in 'ASP General' started by Tomas PAJER, Nov 26, 2005.

  1. Tomas PAJER

    Tomas PAJER Guest

    I have many office files saved in sql server. The system sends them by one
    web page: RequestFile.asp. So every file has the same name requestFile.asp.

    How can i change requested URL on the server from
    www.domain.com/requestFile.asp to www.domain.com/someFileName.doc????

    I am able to rise "Save or open downloaded file" dialog, but this does not
    help me at all.

    Thank you very much.

    Tom
     
    Tomas PAJER, Nov 26, 2005
    #1
    1. Advertising

  2. Tomas PAJER

    PJones Guest

    check out www.aspprotect.com
    or search www.aspin.com


    "Tomas PAJER" <> wrote in message
    news:...
    >I have many office files saved in sql server. The system sends them by one
    > web page: RequestFile.asp. So every file has the same name
    > requestFile.asp.
    >
    > How can i change requested URL on the server from
    > www.domain.com/requestFile.asp to www.domain.com/someFileName.doc????
    >
    > I am able to rise "Save or open downloaded file" dialog, but this does
    > not
    > help me at all.
    >
    > Thank you very much.
    >
    > Tom
     
    PJones, Nov 27, 2005
    #2
    1. Advertising

  3. Tomas PAJER

    Patrice Guest

    Not sure if this is a problem with the client side name of the file or if
    you want the user to think that he loads directly from an URL...

    Do you use http://support.microsoft.com/kb/260519/en-us ? (note the filename
    part that allows to tell which name you want client side)

    Else you could handle the 404 error and use Server.Transfer to go to the
    RequestFile.asp with the proper filename as a parameter. Client side the
    user will think he's loading directly from an URL...

    --

    "Tomas PAJER" <> a écrit dans le message
    de news:...
    > I have many office files saved in sql server. The system sends them by one
    > web page: RequestFile.asp. So every file has the same name

    requestFile.asp.
    >
    > How can i change requested URL on the server from
    > www.domain.com/requestFile.asp to www.domain.com/someFileName.doc????
    >
    > I am able to rise "Save or open downloaded file" dialog, but this does

    not
    > help me at all.
    >
    > Thank you very much.
    >
    > Tom
     
    Patrice, Nov 28, 2005
    #3
  4. Tomas PAJER

    Tomas PAJER Guest

    Hello Patrice.

    I have read that kb article, but it cannot be used. Yes, I can set the name
    of the file in Response.AddHeader "content-disposition","attachment;
    filename=fname.ext" header, but if the user wants to open the file, it is not
    possible. There is no file In temporary internet files folder with that name.
    It is still saved with the name derived from the url.

    I think that the only option is to map the 404 error page to
    requestFile.aspx and use Server.Transfer method. Thank you very much for that
    good idea.

    Tom






    "Patrice" wrote:

    > Not sure if this is a problem with the client side name of the file or if
    > you want the user to think that he loads directly from an URL...
    >
    > Do you use http://support.microsoft.com/kb/260519/en-us ? (note the filename
    > part that allows to tell which name you want client side)
    >
    > Else you could handle the 404 error and use Server.Transfer to go to the
    > RequestFile.asp with the proper filename as a parameter. Client side the
    > user will think he's loading directly from an URL...
    >
    > --
    >
    > "Tomas PAJER" <> a écrit dans le message
    > de news:...
    > > I have many office files saved in sql server. The system sends them by one
    > > web page: RequestFile.asp. So every file has the same name

    > requestFile.asp.
    > >
    > > How can i change requested URL on the server from
    > > www.domain.com/requestFile.asp to www.domain.com/someFileName.doc????
    > >
    > > I am able to rise "Save or open downloaded file" dialog, but this does

    > not
    > > help me at all.
    > >
    > > Thank you very much.
    > >
    > > Tom

    >
    >
    >
     
    Tomas PAJER, Nov 28, 2005
    #4
  5. Tomas PAJER

    Patrice Guest

    Which browser ? This is not he behavior I have with IE6. It may append a
    suffix such as [1] but it uses the filename correctly. Try perhaps to
    enclose the name within ". Should work...

    --
    Patrice

    "Tomas PAJER" <> a écrit dans le message
    de news:...
    > Hello Patrice.
    >
    > I have read that kb article, but it cannot be used. Yes, I can set the

    name
    > of the file in Response.AddHeader "content-disposition","attachment;
    > filename=fname.ext" header, but if the user wants to open the file, it is

    not
    > possible. There is no file In temporary internet files folder with that

    name.
    > It is still saved with the name derived from the url.
    >
    > I think that the only option is to map the 404 error page to
    > requestFile.aspx and use Server.Transfer method. Thank you very much for

    that
    > good idea.
    >
    > Tom
    >
    >
    >
    >
    >
    >
    > "Patrice" wrote:
    >
    > > Not sure if this is a problem with the client side name of the file or

    if
    > > you want the user to think that he loads directly from an URL...
    > >
    > > Do you use http://support.microsoft.com/kb/260519/en-us ? (note the

    filename
    > > part that allows to tell which name you want client side)
    > >
    > > Else you could handle the 404 error and use Server.Transfer to go to the
    > > RequestFile.asp with the proper filename as a parameter. Client side the
    > > user will think he's loading directly from an URL...
    > >
    > > --
    > >
    > > "Tomas PAJER" <> a écrit dans le

    message
    > > de news:...
    > > > I have many office files saved in sql server. The system sends them by

    one
    > > > web page: RequestFile.asp. So every file has the same name

    > > requestFile.asp.
    > > >
    > > > How can i change requested URL on the server from
    > > > www.domain.com/requestFile.asp to www.domain.com/someFileName.doc????
    > > >
    > > > I am able to rise "Save or open downloaded file" dialog, but this

    does
    > > not
    > > > help me at all.
    > > >
    > > > Thank you very much.
    > > >
    > > > Tom

    > >
    > >
    > >
     
    Patrice, Nov 28, 2005
    #5
    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. Ashraf Fouad
    Replies:
    2
    Views:
    584
    Ashraf Fouad
    Jan 8, 2004
  2. Thomas Mlynarczyk

    Generators and their next() and send() methods

    Thomas Mlynarczyk, Nov 15, 2008, in forum: Python
    Replies:
    7
    Views:
    313
    Aaron Brady
    Nov 19, 2008
  3. SamF
    Replies:
    4
    Views:
    159
    Stefano Crocco
    Mar 14, 2007
  4. Sfdesigner Sfdesigner
    Replies:
    5
    Views:
    187
    Chris Shea
    Aug 13, 2007
  5. Sandman

    input names with '-' in their names.

    Sandman, Sep 3, 2003, in forum: Javascript
    Replies:
    4
    Views:
    112
    Lasse Reichstein Nielsen
    Sep 4, 2003
Loading...

Share This Page