Cffile Action = "Readbinary - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

cffile action = "readBinary"

Description
Reads a binary file (such as an executable or image file) on the serve, into a binary object
parameter that you can use in the page. To send it through a web protocol (such as HTTP or
SMTP) or store it in a database, first convert it to Base64 using the
Note: This action reads the file into a variable in the local Variables scope. It is not intended for use
with large files, such as logs, because they can bring down the server.
Syntax
<cffile
action = "readBinary"
file = "full_path_name"
variable = "var_name">
See also
cfdirectory
Attributes
Attribute
Req/Opt
action
Required
file
Required
variable
Required
Usage
You convert the binary file to Base64 to transfer it to another site.
Example
The following example creates a variable named
executable:
<cffile action = "readBinary"
file = "c:\cfusion\bin\cfserver.exe"
variable = "aBinaryObj">
Default
Description
Type of file manipulation that the tag performs.
Pathname of a binary fine to read.
If not an absolute path (starting a with a drive letter and a
colon, or a forward or backward slash), it is relative to the
ColdFusion temporary directory, which is returned by the
GetTempDirectory
Name of variable to contain contents of binary file.
ToBase64
function.
to contain the ColdFusion MX
aBinaryObj
function.
cffile
121

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents