Results 1 to 8 of 8

Thread: Make a file download, instead of opening??

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Location
    Kalix, Norrbotten, SWEDEN
    Posts
    343

    Make a file download, instead of opening??

    I have a file on my webserver.

    I want this file to download when the user clicks the link, not open it in the browser window...

    Can I force it to download??

    /Smirre
    Visual Basic
    C, C++
    Java
    Access
    SQL Server

    MCP, MCSD

  2. #2
    Fanatic Member Gimlin's Avatar
    Join Date
    Dec 2001
    Location
    Hell
    Posts
    734
    easiest thing to do is just zip it.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Location
    Kalix, Norrbotten, SWEDEN
    Posts
    343
    I would perfer not to zip it...

    /Smirre
    Visual Basic
    C, C++
    Java
    Access
    SQL Server

    MCP, MCSD

  4. #4
    scoutt
    Guest
    waht is the file extension?

    if it is a known file extension on the users computer you don't have a choice. but if the file us unknown then they would be able to.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Location
    Kalix, Norrbotten, SWEDEN
    Posts
    343
    Its a PDF file. So it opens in the browser. I was thinking if there was any way to "activate" the save target as on the right click menu when the users click on the link.

    /Smirre
    Visual Basic
    C, C++
    Java
    Access
    SQL Server

    MCP, MCSD

  6. #6
    scoutt
    Guest
    you don't have any control over the file extension per say the user downloading it. if they have acrobat reader installed it will open it and not download it. all you can do is say on your page is "right click and save target" or right click "Save As for NS.

  7. #7
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    Try getting around it...

    Instead of just linking straight to a file create a new server side script, ASP or PHP would be good. Then create some code to the rename the file to a unknown ext, download it, and rename it back afterwards.

    I know its a bit sloppy but it works.
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  8. #8
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

Posting Permissions

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



Click Here to Expand Forum to Full Width