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!

Blob Content using APEX Web Services

Kaushik25Jan 17 2019 — edited Jan 18 2019

I am using APEX 5.1 version. Till now I have created web services that are used to retrieve varchar data in json format.

Now I have a requirement where I need to send blob content(pdf,image,doc files) using my Web API's which can be used by other plateforms.

Please let me know if there is any method to do so.

I have tried converting files to clob format as below but got the error 'numeric or value error'.

begin

select blob_to_clob (BLOB_CONTENT) into l_clob from some_table;

apex_json.open_object;

apex_json.write(l_clob);

apex_json.close_object;

END;

Also I have tried 'apex_web_service.blob2clobbase64'  base64 encoding but got the 'numeric or value error'.

select apex_web_service.blob2clobbase64(BLOB_CONTENT) into l_clob from some_table;

apex_json.open_object;

apex_json.write(l_clob);

apex_json.close_object;

This post has been answered by Tyagi Tushar on Jan 18 2019
Jump to Answer
Comments
Post Details
Added on Jan 17 2019
3 comments
1,683 views