4D v16.3

BASE64 DECODE

Home

 
4D v16.3
BASE64 DECODE

BASE64 DECODE 


 

BASE64 DECODE ( {encodedText ;} blob ) 
Parameter Type   Description
encodedText  Text in Text containing BLOB encoded in Base64 format
blob  BLOB in BLOB encoded in Base64 format
in Decoded BLOB

The BASE64 DECODE command allows you to decode the BLOB coded in Base64 format passed in the encodedText or blob parameter.

If you pass the encodedText parameter, the command decodes its contents and returns it in the blob parameter. It must contain a BLOB encoded in Base64 format. In this case, the initial contents of the blob parameter are ignored by the command.
If you omit the encodedText parameter, the command directly modifies the BLOB passed in the blob parameter.

The command does not verify the contents of the encodedText or blob parameter. You must verify that the data passed is actually coded in Base64 format, otherwise the result will be incorrect.

Example  

This example lets you transfer a picture via a BLOB:

 C_BLOB($sourceBlob)
 C_PICTURE($mypicture)
 $mypicture:=[people]photo
 PICTURE TO BLOB($mypicture;$sourceBlob;".JPG")
 C_TEXT($base64Text)
 BASE64 ENCODE($sourceBlob;$base64Text//Encoding of text
  // the binary is now available as character strings in $base64Text
 
 C_TEXT($base64Text)
 C_BLOB($targetBlob)
 BASE64 DECODE($base64Text;$targetBlob//Decoding of text
  // the binary encoded in base 64 is now available as a BLOB in $blobTarget



See also 

BASE64 ENCODE
Overview of XML DOM Commands
XML DECODE

 
PROPERTIES 

Product: 4D
Theme: Tools
Number: 896

This command can be run in preemptive processes

 
HISTORY 

Created: 4D 2004
Renamed: 4D v12
Modified: 4D v12

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)