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 ToBase64 function.
| |||
Syntax<cffile action = "readBinary" file = "full_path_name" variable = "var_name"> | |||
See also
cfdirectory
|
|||
Usage
You convert the binary file to Base64 to transfer it to another site. |
|||
Example
The following example creates a variable named aBinaryObj to contain the ColdFusion Server executable: <cffile action = "readBinary" file = "c:\cfusion\bin\cfserver.exe" variable = "aBinaryObj"> |
ACTION | |
Required | |
Type of file manipulation that the tag performs. |
FILE | |
Required | |
Absolute pathname of file. On Windows, use backward slashes; on UNIX, use forward slashes. |
VARIABLE | |
Required | |
Name of variable to contain contents of binary file. |