37.6 BLOB2CLOBBASE64 Function
Use this function to convert a BLOB datatype into a CLOB that is base64 encoded. This is often used when sending a binary as an input to a Web service.
                  
Syntax
APEX_WEB_SERVICE.BLOB2CLOBBASE64 (
	    p_blob IN BLOB)
RETURN CLOB;
Parameters
Table 37-1 BLOB2CLOBBASE64 Parameters
| Parameter | Description | 
|---|---|
| 
 | The BLOB to convert into base64 encoded CLOB. | 
Example
The following example gets a file that was uploaded from the apex_application_files view and converts the BLOB into a CLOB that is base64 encoded.
                  
declare
    	l_clob	CLOB;
    l_blob	BLOB;
begin
    SELECT BLOB_CONTENT
      INTO l_BLOB
      FROM APEX_APPLICATION_FILES
      WHERE name = :P1_FILE;
 
    l_CLOB := apex_web_service.blob2clobbase64(l_BLOB);
end;Parent topic: APEX_WEB_SERVICE