Contents

cfcontent

Description

Defines the MIME type returned by the current page. Optionally, lets you specify the name of a file to be returned with the page.

Category

Other

Implemented

Usage Syntax

<cfcontent  
	[type="String"]
	[deleteFile="Boolean"]
	[range="Boolean"]
	[file="String"]
	[content="Binary"]
	[variable="Any"]
	[reset="Boolean"]
 />

[] = Optional attribute

Attributes

Name Type Required Default Description
type String No Defines the File/ MIME content type returned by the current page.
deleteFile Boolean No Yes or No. Yes deletes the file after the download operation. Defaults to No. This attribute applies only if you specify a file with the file attribute.
range Boolean No Yes or No. Yes allows download ranges, no forbids download range, default let it open for client.
file String No The name of the file being retrieved
content Binary No the content to output as binary
variable Any No the variable name to the content to output as binary
reset Boolean No Yes or No. Yes discards output that precedes the call to cfcontent. No preserves the output that precedes the call. Defaults to Yes. The reset and file attributes are mutually exclusive. If you specify a file, the reset attribute has no effect.

Example Usage