2 Replies Latest reply on Nov 3, 2006 9:59 AM by Al_in_Littleton

    Creating a page from which people can download a file

    Al_in_Littleton Level 1
      My client wants people to be able to download sermons from the church web site. They are delivered as .mp4 files so they can use them in IPods.

      I have tried simply listing them (link is in the database) and telling them to right click on them. That works superbly in Firefox 1.5 and 2.0, but I get errors in Opera (latest version) and IE 7.

      I have tried using CFCONTENT (code below) and it works great in Firefox 1.5, but not in Firefox 2.0, IE 7 or Opera.

      Here's the code. Any help would be appreciated.


      <cfoutput query="GetSermon">
      <cfquery name="GetSermon" datasource="db">
      Select * from sermons
      WHERE sermon_id=#form.sermon_id#
      </cfquery>

      <cfset sermonfile =#sermon_link#>
      <cfcontent type="application/x-unknown">
      <cfheader name="Content-Disposition" value="attachment;filename=#sermonfile#">
      <cfheader name="Content-Description" value="This is a sound file.">
      <cflocation url=" http://www.trinitypres.us/tpc/sermons/#sermonfile#">
      </cfoutput>