ASP Force Download of file from webserver

Discussion in 'ASP General' started by JP SIngh, Jun 21, 2005.

  1. JP SIngh

    JP SIngh Guest

    Hi All

    I am creating an asp application which is essentially a file management app.

    I am trying to get my head around a technically issue wonder if someone can
    offer some help.

    I want to be able to force the download of the files are attached to a
    particular record.

    The code which i use to force the download is

    <%
    strPath = "C:\MyFiles"
    Set Upload = Server.CreateObject("Persits.Upload")
    ' Build path to file
    strPath = uploadfilepathactual
    Path = strPath & "\" & strFileName
    Upload.SendBinary Path, True, "application/octet-binary", True
    %>

    I want to be able to change the path to say something like

    strPath = \\servername\c$\myfiles

    Is the above possible. Any other alternatives.

    Regards
    Jas
    JP SIngh, Jun 21, 2005
    #1
    1. Advertising

  2. I'm not sure how your upload thing is relating to forcing a download or how
    the UNC path is tying in here. What are you trying to do?

    Ray at work

    "JP SIngh" <> wrote in message
    news:eoZ$...
    > Hi All
    >
    > I am creating an asp application which is essentially a file management

    app.
    >
    > I am trying to get my head around a technically issue wonder if someone

    can
    > offer some help.
    >
    > I want to be able to force the download of the files are attached to a
    > particular record.
    >
    > The code which i use to force the download is
    >
    > <%
    > strPath = "C:\MyFiles"
    > Set Upload = Server.CreateObject("Persits.Upload")
    > ' Build path to file
    > strPath = uploadfilepathactual
    > Path = strPath & "\" & strFileName
    > Upload.SendBinary Path, True, "application/octet-binary", True
    > %>
    >
    > I want to be able to change the path to say something like
    >
    > strPath = \\servername\c$\myfiles
    >
    > Is the above possible. Any other alternatives.
    >
    > Regards
    > Jas
    >
    >
    Ray Costanzo [MVP], Jun 21, 2005
    #2
    1. Advertising

  3. JP SIngh

    Bullschmidt Guest

    Bullschmidt, Jun 30, 2005
    #3
    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. Kele
    Replies:
    0
    Views:
    2,780
  2. Christophe Vanfleteren

    Download Files From Webserver

    Christophe Vanfleteren, Oct 6, 2003, in forum: Java
    Replies:
    5
    Views:
    461
    Andrew
    Oct 7, 2003
  3. JP SIngh

    Force a file download from ASP Page

    JP SIngh, Sep 15, 2006, in forum: ASP General
    Replies:
    1
    Views:
    144
    Patrice
    Sep 15, 2006
  4. PingBad
    Replies:
    2
    Views:
    148
    Evertjan.
    Jan 23, 2009
  5. Navin
    Replies:
    1
    Views:
    163
    Grant Wagner
    Aug 28, 2003
Loading...

Share This Page