Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Apex 5.1.4.00.08 - how to remove linebreaks from apex_web_service.blob2clobbase64 ?

PaavoOct 8 2018 — edited Oct 23 2018

I am trying to get valid base64 clobs from file blobs in a table and found that apex_web_service.blob2clobbase64 is splitting the clob to lines which doesn't work for my rest ws attempts.

If I fix the linebreaks away manually the clob is valid and works. Also If I use functions from here, they provide directly valid clob i need to convert field blob to xs:base64binary with pl*sql

Is there a parameter i am missing for apex_web_service.blob2clobbase64 to get the base64 encoded line in one line?

My environment:

Apex 5.1.4.00.08

Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production

PL/SQL Release 12.1.0.1.0 - Production

"CORE 12.1.0.1.0 Production"

TNS for Linux: Version 12.1.0.1.0 - Production

NLSRTL Version 12.1.0.1.0 - Production

Bytes with this: https://asktom.oracle.com/pls/asktom/asktom.search?tag=get-the-length-of-clob-columns-in-bytes

--https://asktom.oracle.com/pls/asktom/asktom.search?tag=get-the-length-of-clob-columns-in-bytes

select f3.id, f3.filename,f3.file_clob fclob,CLOBLENGTHB(f3.file_clob) cloblengthb, made

    ,dbms\_lob.compare(f3.file\_clob,(select fu.file\_clob from test\_clob\_file3  fu where fu.id=1)) "compare clob with id=1"

from test_clob_file3 f3

pastedImage_9.png

And in sqldeveloper the clob looks like this:

pastedImage_10.pngthe base64 clob is split to several lines

pastedImage_11.pngthe base64 goes to one line

rgrds Paavo

This post has been answered by Pavel_p on Oct 22 2018
Jump to Answer
Comments
Post Details
Added on Oct 8 2018
9 comments
1,179 views