Posts

Showing posts from June, 2016

Download Blob files as ZIP in Oracle APEX using PL/SQL

Image
Objective : To download blob files (ZIP Files) from table in APEX using Oracle PL/SQL. Scenario : Customer has asked us to give the provision in APEX, which is used to download the blob files from Oracle APEX application itself.  Solution : Step 1:  Create APEX process using below PL/SQL anonymous block. << Anonymous Block <> DECLARE   v_mime      VARCHAR2(48);   v_length    NUMBER(38);   v_file_name VARCHAR2(38);   p_src BLOB;   p_pw VARCHAR2(200);   v_return BLOB; BEGIN   p_pw := 'test';   BEGIN     SELECT       'test' ,       compressed_blob ,       'Redemption_payout.RAR' ,       dbms_lob.getlength(compressed_blob)     INTO       v_mime ,       p_src ,       v_file_name ,       v_length     FROM       red_compressed_files;   exception   WHEN others THEN     ROLLBACK;   END;   BEGIN     v_return := zip_blobs.encrypt( p_pw => p_pw, p_src => p_src );   END