Please enable JavaScript to view this site.

InterFormNG2 Manual

Navigation: XPath > Built-in functions

ng:base64EncodeFile

Scroll Prev Top Next More

The built-in function, ng:base64EncodeFile converts the binary contents of a file into base64. This can e.g. be used, if you want to insert any kind of data into an XML node, without substituting any characters, that are not allowed.

 

This function is related to the functions: ng:base64, ng:base64ToUTF8 and ng:base64EnodeResource

 

This can e.g. be used, if you want to insert dynamic images directly in the contents of an email.

 

Here is an example:

 

ng:base64EncodeFile('D:\temp\Myfile.txt')

 

This returns the base64 encoded data, that is found in the file, D:\temp\Myfile.txt

 

If the file e.g. contains the text:

 

InterForm

 

Then the function returns the equivalent base64 data stream:

 

SW50ZXJGb3Jt