cfcontent

Overview ColdFusion Open BlueDragon Lucee

Does either or both of the following: * Sets the MIME content encoding header for the current page * Sends the contents of a file from the server as the page output

Attributes

Name Required Type Default Description
content No the content to output as binary
deletefile No Boolean false Applies only if you specify a file with the file attribute. Yes: deletes the file on the server after sending its contents to the client. No: leaves the file on the server.
file No String Name of file whose contents will be the page output. When using CFML in a distributed configuration, the file attribute must refer to a path on the system on which the web server runs. When you use this attribute, any other output on the current CFML page is ignored; only the contents of the file is sent to the client.
output No The variable that contains the content to send to the request
3
range No Yes or No. Yes allows download ranges, no forbids download range, default let it open for client.
reset No Boolean true The reset and file attributes are mutually exclusive. If you specify a file, this attribute has no effect. Yes: discards output that precedes call to cfcontent No: preserves output that precedes call to cfcontent. In this case all output is sent with the specified type.
type No String The MIME content type of the page, optionally followed by a semicolon and the character encoding. By default, CFML sends pages as text/html content type in the UTF-8 character encoding.
uridirectory No Is the path to the file relative to the document root
variable No String Name of a ColdFusion binary variable whose contents can be displayed by the browser, such as the contents of a chart generated by the cfchart tag or a PDF or Excel file retrieved by a cffile action="readBinary" tag. When you use this attribute, any other output on the current CFML page is ignored; only the contents of the file are sent to the client.