WEB How do you make a vCard downloadable?

Discussion in 'OT Technology' started by Style, Aug 12, 2008.

  1. Style

    Style Boioioioioioioioing

    Joined:
    Apr 29, 2005
    Messages:
    13,778
    Likes Received:
    0
    Location:
    Dubai
    I'm trying to upload a vCard (.vcf), but when I try to download it, it gives me a weird text file. Have a look:

    www.lightblu.com/test.vcf

    wtf?
     
  2. Style

    Style Boioioioioioioioing

    Joined:
    Apr 29, 2005
    Messages:
    13,778
    Likes Received:
    0
    Location:
    Dubai
    When I right-click > save as, it works fine. But I just want to click it instead.
     
  3. schmack

    schmack Professional Lurker OT Supporter

    Joined:
    Mar 12, 2003
    Messages:
    1,665
    Likes Received:
    13
    Google search for "force download" and your server type and you should find the information you need. I recently had to do this for roster files for our athletics department.
     
  4. Style

    Style Boioioioioioioioing

    Joined:
    Apr 29, 2005
    Messages:
    13,778
    Likes Received:
    0
    Location:
    Dubai
    Yea I did some research and a lot of people strongly discourages using such scripts, as it poses a security threat (ie. you could download any file on the webserver, even PHP ones with sensitive data in it, such as passwords...)

    Anyways, the link works just as intended on IE, but not on FF. Why?
     
  5. schmack

    schmack Professional Lurker OT Supporter

    Joined:
    Mar 12, 2003
    Messages:
    1,665
    Likes Received:
    13
    Are you on Apache/IIS/???. For IIS, all I had to do was change a setting for the MIME type/extention I wanted to force a download. No scripting required.
     
  6. Cthalupa

    Cthalupa New Member

    Joined:
    May 5, 2006
    Messages:
    46,930
    Likes Received:
    0
    Location:
    Dallas, Texas
    Huh? PHP files? You change the setting for that one mime type, not everything.
     

Share This Page