Skip to content

Instantly share code, notes, and snippets.

@tschf
Created August 10, 2015 21:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tschf/38a18f50ef8d313970b6 to your computer and use it in GitHub Desktop.
Save tschf/38a18f50ef8d313970b6 to your computer and use it in GitHub Desktop.
Download file with wpg_docload
declare
l_file files%rowtype;
begin
select *
into l_file
from files
where id = 261;
owa_util.mime_header(l_file.mime_type);
htp.p('Content-length: ' || dbms_lob.getlength(l_file.file_contents));
owa_util.http_header_close;
wpg_docload.download_file(l_file.file_contents);
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment