The following works:


-- CONVERTING THE CLOB TO UNICODE THEN TO BLOB
v_blob := clob_to_blob (NCLOB(v_clob);
htp.p ('Content-length: ' || length(v_blob));
................
OWA_UTIL.http_header_close;
-- Download the file
WPG_DOCLOAD.download_file(v_blob);
......