Monday, November 15, 2021

Login User Image Display on Navigation Menu In Oracle Apex


1
.Create application item name > 'IMAGE_ID',> Session State Protection > Unrestricted.

2.Create Application Processes > 'GETIMAGE',> Process Point > Ajax Callback, > PL/SQL Code >

begin for c1 in (select * from employee_information where unique_id = :IMAGE_ID) loop sys.htp.init; sys.owa_util.mime_header( c1.MIME_TYPE, FALSE ); sys.htp.p('Content-length: ' || sys.dbms_lob.getlength( c1.PICTURE)); sys.htp.p('Content-Disposition: attachment; filename="' || c1.FILENAME || '"' ); sys.htp.p('Cache-Control: max-age=3600'); -- tell the browser to cache for one hour, adjust as necessary sys.owa_util.http_header_close; sys.wpg_docload.download_file( c1.PICTURE); apex_application.stop_apex_engine; end loop; end;

3.Create/Select navigation bar where you want to show image > User Defined Attributes 1.

<img style="width:25px;height:25px;border-radius:50%;cornflowerblue" src="f?p=&APP_ID.:0:&APP_SESSION.:APPLICATION_PROCESS=GETIMAGE:::IMAGE_ID:&APP_USER." alt=" ">

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. i'm not able to display image which is in JPG Format but if bmp format works fine.

    ReplyDelete

Image File store outside of Oracle Database and show image into Apex Application

Directory Create : grant execute on utl_file to HRMS; CREATE OR REPLACE DIRECTORY STOCK_DIRECTORY AS 'C:\Program Files (x86)\Apache Sof...