Reads an on-disk or in-memory binary file (such as an executable or image file) on the server, into a binary object

fileReadBinary(filePath) → returns binary

Argument Reference

filePath string

Absolute path to the file.

Sample code invoking the fileReadBinary function

Uses expandPath to grab a file in current directory.

binaryContent = fileReadBinary(expandPath('./file.pdf'));

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub