SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist galt's Avatar
    Join Date
    Apr 2002
    Posts
    461
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I download a file?

    I want to put a file on my site, and have it download when the link is clicked. Is there a protocol setting (http: ftp: mailto for my link string that will cause this to happen automagically? I am sure it is simple, I just can't seem to find the info.

    Maybe this should be over in the "HTML for dummies" forum?

  2. #2
    pg for mild peril cow's Avatar
    Join Date
    Mar 2000
    Location
    nevada, usa
    Posts
    636
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there isn't anything in html to force a file to be downloaded.
    "There's no justice like angry mob justice!" --Seymour Skinner

  3. #3
    SitePoint Evangelist galt's Avatar
    Join Date
    Apr 2002
    Posts
    461
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, so how do those "Click here to download file" thingies work ?

  4. #4
    SitePoint Wizard
    Join Date
    Jul 2001
    Location
    The Netherlands
    Posts
    2,617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It depends if the file has an extension that can be opened by your browser. The browser won't open .zip or .exe files, but it will attempt to load .doc and .xls files.
    It basically depends on the file itself, if you are not sure test it, or just zip it. Most people use Winzip, and you will be sure that the file can be downloaded. Just linking to the file should bring up a download window in that case.

  5. #5
    SitePoint Evangelist galt's Avatar
    Join Date
    Apr 2002
    Posts
    461
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That did the trick. Thanks.

  6. #6
    Non-Member Forlorn's Avatar
    Join Date
    Mar 2002
    Location
    San Diego, California
    Posts
    1,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in HTML just create a link to the file it will download auto.

  7. #7
    Guru Bullschmidt's Avatar
    Join Date
    Apr 2002
    Location
    USA
    Posts
    524
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's an answer with ASP...

    Force "file download" for known file types
    http://www.kosob.com/detail.asp?t=t&id=516
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips


Bookmarks

Posting Permissions

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