cfclient.file.readAsBase64

Reading a file as a Base64 string

You can read a text file with the read function. The following example shows a simple usage:

<cfset opt = cfclient.camera.getOptions()>
<cfset res = cfclient.camera.getPicture(opt,false)>
<cfset imgStr=cfclient.file.readAsBase64(res)>

Method summary

readAsBase64(filename) - Reads the content of a given file

  • returns – Content of file in the form of a base64 encoded string
  • params
    •  filename - Absolute or relative path of the file (including file name) 

 Adobe

Get help faster and easier

New user?