hi ,
I need to decode a base64 string received as part of JSON payload from the client.
I am using the below scripts provided by Tim Hall to validate the base64 encode/decode would work or not.
https://oracle-base.com/dba/miscellaneous/base64encode.sql
https://oracle-base.com/dba/miscellaneous/base64decode.sql
For this purpose i apply these scripts on a BLOB (PDF) column in my server database.
Q1:
select dbms_lob.getlength(file_data)
from fnd_lobs
where file_id = <file_id>; -- file_data contains binary BLOB data with content type = application/pdf.
Length of BLOB : 74021
Q2:
select dbms_lob.getlength(base64decode(base64encode(file_data)))
from fnd_lobs
where file_id = <file_id>; -- file_data contains binary BLOB data with content type = application/pdf.
Length of BLOB : 74018
The PDF/BLOB generated from Q2 does not open in a PDF viewer.
Could someone please advise where am going wrong or if the scripts used need any changes? Or do we have an PLSQL API for data above 32 K?
BR,
Arun