>- see footer for list info -<
Hi Paul

This is some sample code from our use of the cfcontent tag...

<cfsetting enablecfoutputonly="Yes">
<cffile action="read" file="#pathToFile#" variable="filecontent">

<CFHEADER NAME="Content-Disposition" VALUE="attachment;
filename=userInfo.xls">
<!--- <CFHEADER NAME="Content-Disposition" VALUE="inline;
filename=userInfo.xls"> --->
<cfcontent type="application/msexcel">
<cfoutput>#filecontent#</cfoutput>

We've got here after lots of slog with cfcontent, including that we couldn't
get the file attribute to work!  The difference between the 'attachment' and
(commented out) 'inline' CFHEADERs is that the former will result in a file
download dialog, even if the user has specified a 'helper' application for
that mime type.

HTH
Robin 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Duncan Cumming
Sent: 01 February 2007 13:08
To: [email protected]
Subject: Re: [CF-Dev] CFCONTENT & SVG

>- see footer for list info -<
Paul, do you know if this <cfcase> gets executed at all?

Also you set a variable that you then don't use...
<cfset mime_type = "image/svg+xml">
<cfcontent file="C:\Inetpub\wwwroot\cfpages\newperform\svg\346.svgz" 
type="image/svg+xml">

should probably be, unless you're using the variable for something else:

<cfset mime_type = "image/svg+xml">
<cfcontent file="C:\Inetpub\wwwroot\cfpages\newperform\svg\346.svgz" 
type="#mime_type#">


Duncan Cumming
New Media Developer
Customer Relations Management / Education
Fife Council
700 4105 / 01592 414105

>>> [EMAIL PROTECTED] 01/02/2007 13:00 >>>
>- see footer for list info -<
Hi all.

I don't seem able to get cfcontent to open SVG files.

I have this ....

<cfcase value=".svgz">
                <cfset mime_type = "image/svg+xml">
                This is an SVGZ FILE ....<br>

                <cfcontent
file="C:\Inetpub\wwwroot\cfpages\newperform\svg\346.svgz" 
type="image/svg+xml">
                <cfabort>
        </cfcase>

The file opens if I go directly to here

http://www.bgfl.org/cfpages/newperform/svg/346.svgz 

Any ideas ....?

Regards - Paul


_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo 

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<


**********************************************************************
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
and should not be disclosed to any other party. 
If you have received this email in error please notify your system manager
and the sender of this message.

This email message has been swept for the presence of computer viruses but
no guarantee is given that this e-mail message and any attachments are free
from viruses.

Fife Council
Tel: 08451 55 00 00
************************************************

_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<


_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to