Jochem
Thanks for your suggestions so far. I like to shoot the web browser
developers, tho not the customer :o)
But I think I have not explained very well, or am not understanding.
I am on an NT 4.0/SP6a server, using ColdFusion 4.5.1.(hopefully to
upgrade to 5.0 soon)
When I add the filename, <CFCONTENT> is looking for the file to
already exist, which it does not, the user will be creating it at the time
of viewing, saving it on their drive. Maybe I am doing something else
wrong. here is a simple look at the process.
User is given options to create the graph from, this
information is then sent to a custom tag <CF_graph> (I down loaded from tag
gallery, uses tables to build bar graphs).
on the action page I place the call to the <CF_graph> tag, with <CFCONTENT>
at the top of page:
<!--page comments--->
<CFcontent type="application/vnd.ms-powerpoint">
<CF_graph attributes=#vals#>
with your suggestions looks like:
<!---page comments---->
<cfheader name="Content-disposition"
value="attachment;filename=#filename#">
<cfcontent type="application/octet-stream" file="#filename#">
<!---I also added the relocation back---->
<CFlocation url="previouspage.cfm">
and as I said, when user chooses to save file, this works fine a PowerPoint
file is saved that can be later view in PowerPoint, but when the user
chooses to open from present location, it displays fine, just errors when
user moves or clicks on scroll bar. I don't need it to display here, just
save as a file, if there is another way to get this graph saved as a
PowerPoint slide I could use that.
I also do the same for creating Excel spreadsheets and Word Docs. I have
no problems with them.
<CFcontent type="application/msword">
<CFcontent type="application/msexcel">
again thanks for your help in working through this
Rodney
-----Original Message-----
From: Jochem van Dieten [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 11:30 PM
To: CF-Talk
Subject: Re: Help needed with CFCONTENT
Bruce, Rodney wrote:
> The problem with using "application/octet-stream", is that the user
doesn't
> get the option to save the file.
>
> I want the user to be able to save the file just not open it in the
browser.
> The purpose is for the user to save as PowerPoint slide, to be added to
> presentations later.
Forgot to mention that you will also need a content-disposition header.
<cfheader name="Content-disposition" value="attachment;
filename=#filename#">
<cfcontent type="application/octet-stream" file="#filename#">
If this doesn't work, shoot the customer for using a browser that does
not adhere to the suggestions made in RFC 2616, paragraph 19.5.1, which
is still the formal definition of the HTTP protocol.
Jochem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists