1 Reply Latest reply on Jul 20, 2006 7:47 AM by Mr Black

    Download csv file

    kruse Level 1
      I use this line to download a csv file.

      <CFLOCATION URL="c:\file.csv" Addtoken="No">

      It works as intended in the production environment. The save or open box is showen and if open is clicked Excel opens the csv file.

      But when this is run locally(development) no box is shown and the file opens up in the browser like:

      EmployeeId;Name;Firstname;Lastname;Infix "876478";"Albert Vergeer";"Albert";"Vergeer";"" "7";"Ingrid Mol";"Ingrid";"Mol";"" "4";"Stephanie Harmsen-Kuhl";"Stephanie";"Harmsen-Kuhl";"" "6";"Susanne Kimkes";"Susanne";"Kimkes";"" "8";"Taco Morelisse";"Taco";"Morelisse";""

      Why is that? Is it because I'm running the build in webserver locally and ms iis in production?
      Can't the build in web server not handle this?

      How can I make it work on the locally?
        • 1. Re: Download csv file
          Mr Black Level 1
          Not clear how it can work at all. CFLOCATION accepts URL (virtual path). Did you mean CFCONTENT?

          In general, how client's browser treats the content is defined by the "Content-Disposition" HTTP header that you can add with CFHEADER. By default, it is "inline" - should be displayed in the browser, rather than saved.