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.
APEX_WEB_SERVICE.BLOB2CLOBBASE64 ( p_blob IN BLOB) RETURN CLOB;
Table 22-1 describes the parameters available in the
The BLOB to convert into base64 encoded CLOB.
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;