You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

compress multiple files using APEX_ZIP

edited Aug 13, 2019 5:42PM in Database 4 comments

Summary

compress multiple files using APEX_ZIP

Content

Hi everyone,

I am trying to zip the contents of a table where I use four fields.

My code gives an error when trying to compile it:

CREATE OR REPLACE PROCEDURE ZIP_IMPORT_WPI_FILES
AS
l_zip_file blob;
BEGIN
    FOR f IN (SELECT METADATA_NAME, METADA, IMAGE_NAME, IMAGE FROM FILES_PI)
    LOOP
       apex_zip.add_file (
            p_zipped_blob => l_zip_file,
            p_file_name   => f.IMAGE_NAME,
            p_content     => f.IMAGE );
       
       apex_zip.add_file (
            p_zipped_blob => l_zip_file,
            p_file_name   => f.METADATA_NAME,
            p_content     => f.METADA);
Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!