PL/SQL (MOSC)

MOSC Banner

Trouble using wpg_docload.download_file with BLOB variable

edited Dec 18, 2014 10:04AM in PL/SQL (MOSC) 5 commentsAnswered

The code below used to work, but we think some change of environment made it stop working:

procedure download (p_seq IN number) is
   p_arquivo blob;
   encrypted blob;
   v_size INTEGER;
     --content_type blob;
begin

  select  arquivo
  into  encrypted
   from arh_declaracoes_bem
  where seq = p_seq;
  
   if (encrypted is not null) and INSTR(crpk_parametros.get_string('PARAMETER'), ','||USER||',') <> 0 then
      DBMS_LOB.CREATETEMPORARY(p_arquivo, TRUE, DBMS_LOB.CALL);
      DBMS_CRYPTO.Decrypt(
         dst => p_arquivo,
         src => encrypted,
         typ => DBMS_CRYPTO.AES_CBC_PKCS5,
         key => hextoraw ('<--Actual key not shown here-->')
      );
     
      -- get size

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center