How to Display IMAGE BLOB stored in a table in a html region APEX

Need to know how to display an image stored in a table in a HTML APEX Region.
Please

Hi
Please explain what you mean by it doesn't work?
Are there errors messages, at what point, how far did you get and exactly what did you do????
Please provide more information.
Thanks
Ben

Similar Messages

  • Alternative method for displaying images blobs stored in DB

    I am trying to use an Application Process as a means to displaying images stored in BLOB columns in my table. And it works except for one problem. The code for my on-demand Application Process is below (the name of the application process is OUTPUT_IMAGE):
    DECLARE
    l_mime VARCHAR2(255);
    l_length NUMBER;
    l_file_name VARCHAR2(2000);
    lob_loc BLOB;
    BEGIN
    SELECT photo_mime_type,
    photo_blob,
    photo_filename,
    dbms_lob.getlength(photo_blob)
    INTO l_mime,
    lob_loc,
    l_file_name,
    l_length
    FROM persons
    WHERE id = <b>260</b>;
    owa_util.mime_header(nvl(l_mime,'application/octet'), FALSE);
    htp.p('Content-length: ' || l_length);
    htp.p('Content-Disposition: filename="' || l_file_name || '"');
    owa_util.http_header_close;
    wpg_docload.download_file(lob_loc);
    END;
    I can then create HTML like:
    &lt;img src="f?p=[my_app_id]:0:[the_session_id]:APPLICATION_PROCESS=OUTPUT_IMAGE"&gt;
    Which works nicely.
    The question/problem is: How can I pass the ID of the record (whose BLOB I want to display) to the Application Process? (In the code above you'll see the value of <b>260</b> is currently hard coded). I thought about tacking on something like "&my_id=xxx' to the end of the URL but doing so prevents the Application Process from even running.<BR/><BR/>
    All comments/suggestions much appreciated,<BR/><BR/>
    Thanks,
    <BR/>
    Andy

    Andrew,
    The URL for an Application Process uses the standard f?p syntax.
    Try passing your value like this:
    < img src="f?p=[my_app_id]:0:[the_session_id]:APPLICATION_PROCESS=OUTPUT_IMAGE:NO::MY_ID:[the value to send]"> You would need to have an item called MY_ID.
    Your query could then refer to it as
    WHERE id = :MY_ID;
    Doug

  • How to display image that's in a table (BLOB datatype) in  apex 4.0 report

    I have an image that is in a table and I'm trying to get it to display in a report. The upload takes place on 1 page and the report is on another page. The source for the report page is as follows:
    select firstname,
    lastname,
    decode(nvl(dbms_lob.getlength(IMAGE),0),0,null,
    '<img '||
    'src="'||
    apex_util.get_blob_file_src('P1_PHOTO',username)||
    '" height="75" width="75" alt="Product Image" title="Product Image" />')
    detail_img
    from user_image
    P1_PHOTO is the upload item on page 1. My report is on another page. The image is not displayed in the report. Any ideas would be appreciated.

    Hi Charlie69,
    Go the Report Attributes -> BLOB Column -> Number / Date Format. Below this attribute you will find
    the link BLOB Download Format Mask which will open a dialog to fill in following information:
    1) Format Mask: IMAGE
    2) BLOB Table: Name of the table where to find the required BLOB
    3) BLOB Column: Table column name where you stored the actual BLOB
    4) Primary Key Column 1: Primary key of the table where BLOB is stored
    5) Primary Key Column 2:
    6) MIME Type Column: (Table column name where you stored the required information about BLOB)(Type: VARCHAR2)
    7) Filename Column: (Table column name where you stored the required information about BLOB)(Type: VARCHAR2)
    8) BLOB Last Updated Column: (Table column name where you stored the required information about BLOB)(Type: DATE)
    9) Character Set Column: (Table column name where you stored the required information about BLOB)(Type: VARCHAR2)
    10) Content Disposition: Inline(If you want to show it in the browser)
    11) Download Link Text: (Not necessary when you want to show image)
    I have set the format mask accordingly and the image is displayed in my report.
    Hope it helps!
    Regards,
    Kiran

  • How to display the value of a javascript variable in a html region ?

    Hello,
    I need to display my page title or name in a html region.
    I added a script in the <title> section of the template header... :
    (thanks Andy : Get page name from page attributes ?
    <script type="text/javascript">
    var pageTitle = '#TITLE#';
    </script>... so I can use it in a javascript variable.
    But now I don't know how to display it in a html syntax..
    Thanks!
    Fanny

    ... so I can use it in a javascript variable.Don't see any reason to modify page templates to introduce an unnecessary global JS variable when the document property is already there. Display it using an appropriate HTML element, e.g <tt>h1</tt> if it's the overall page heading.
    <h1>
      <script type="text/javascript">
        document.write(document.title);
      </script>
    </h1>

  • How to display image?

    Hi all,
    How to display image from the database table in the adobe form by using web dynpro abap?
    I want to display image in the adobe interactive form by using web dynpro abap.
    Please help me.
    Regards,
    srini

    Hi Srini,
    If you go through the article you might have seen the following piece of code
    *** Send the values back to the node
      lo_el_z_if_test_cv->set_static_attributes(
        EXPORTING
          static_attributes = ls_z_if_test_cv ).
    " here ls_z_if_test_cv has the image in XSTRING format which has beeen retrived using METHOD get_bds_graphic_as_bmp of CLASS cl_ssf_xsf_utilities
    " In  your case you need to just use the select query n fetch it from your table; ( provided your image is store in XSTRING format )
    How is your image stored in your database table ?
    Regards,
    Radhika.

  • MAX: How to display icons (blob) in VB

    Hi!
    I've written a VB application which gets some information from MAX. It works very well, but I was wondering how to display the icons (stored as blob). Who can help me? Thank you in advance!!
    here is a piece of my code:
    Dim maxConf As mxConfiguration
    Dim maxItems As mxItems
    Dim maxItemAttribute As ImxItemAttribute
    Set maxConf = New MXCTRLLib.mxConfiguration
    maxConf.Initialize ("Local")
    Set maxItems = maxConf.EnumItems("CAT=Software,ALL")
    Set maxItemAttribute = maxItems.Item(ItemsListBox.ListIndex).EnumItemAttributes.Item(AttributesListBox.ListIndex)
    Select Case maxItemAttribute.AttributeType
    Case "Blob"
    'here, I want to display the icon and I need your help!
    Case Else
    ListBox1.AddItem (maxItemAttribute.AttributeValue)
    end select

    I will try this when I get back home - travelling at the moment.
    A bit more background....... I have a Function that is called to produce a yearly calendar view of rentals for a home, along with the rental prices - this has already been written using the as_pdf3 package, which can either physically create the report on the server (using utl_file), or it can return the blob direct.
    On the screen, the user can select the years that they wish to see in the report, push a button which will pass the parameters into the above said function, and then launch the "blob" in another window (as the blob is PDF format, it would launch the users PDF reader) - if the user then wants to save the report, they can do (using PDF reader) - this avoids me a) saving and housekeeping a file(s) on the server, b) I don't have to enable utl_file for the schema

  • How to display images and information

    how to display images and information(e.g. like questions) on a jsp page that stored in a database

    Look As far as i can see....
    Utlimately every file could be expressed as a bytes buffer.
    so say if you have a bean called Choice Bean which is expressed as
    public class ChoiceBean{
       private String choiceid;
       private String choicedesc;
       private byte image[];
       public void setChoiceId(String choiceid){
              this.choiceid = choiceid;
        public String getChoiceId(){
               return this.choiceid;
          public void setChoiceDesc(String choicedesc){
               this.choicedesc = choicedesc;
           public String getChoiceDesc(){
               return this.choicedesc;
           public void setImage(byte image[]){
                  this.image = image;
             public byte[] getImage(){
                  return this.image;
    }QuestionList.java:
    ===============
    public class QuestionList{
         private List<ChoiceBean> choicelist;
          /*Other member variable declarations*/
           public  List<ChoiceBean> getChoiceList(){
                    /*Custom code where you may build the list by querying the DA layer*/
                     return this.choicelist;
         public int search(String choiceid){
                 int index = -1;
                 for(int i =0 ; i < this.choicelist.size() ; i++){
                        ChoiceBean cb = this.choicelist.get(i);
                         if(cb.getChoiceId().equals(choiceid)){
                                index = i;
                                break;
                 return index;
        /* Other member method declarations */
    }and you are retreving List<ChoiceBean> from DB using your query & have created a session attribute / <jsp:useBean> named ChoiceList
    NOTE: sometimes your application server can go out of bounds as you are consuming a lot of memory by creating an arraylist object.
    use the following methodology to display images & choices
    sample.jsp:
    =========
    <jsp:useBean id="QuestionList"  class="com.qpa.dao.QuestionList" scope="session"/>
    <TABLE>
    <%
    /* QuestionList.getChoiceList() is a method which fetches data from the DB & returns it in form of  List<ChoiceBean> */
    List<ChoiceBean> choicelist = QuestionList.getChoiceList();
    for(int i =0 ; i < choicelist.size() ; i++){
    %>
    <TR>
    <TD><%!=choicelist.get(i).getChoiceId()%></TD>
    <!-- calling servlet which renders an images in JPG format based upon given choiceid(unique field) -->
    <TD><IMAGE src="ImageServlet?choiceid=<%!=choicelist.get(i).getChoiceId()%>"/> </TD>
    <TD><%!=choicelist.get(i).getChoiceDesc()%></TD>
    </TR>
    <%
    %>
    </TABLE>
    <%
        session.remove("QuestionList");
    %>
    NOTE: usage of JSTL or any other custom built tag-libraries makes life more simpler in the following case
    ImageServlet.java:
    ===============
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            byte buffer[] = null;
            HttpSession session = request.getSession(false);
            /*getting the QuestionList from the session*/
            QuestionList ql = null;
            String choiceid = new String("");
            try{
                 choiceid = request.getParameter("choiceid");
                 /*getting the QuestionList from the session*/
                ql = (QuestionList)  session.getAttribute("QuestionList");
            } catch(Exception exp){
            if(choiceid.equals("") == false &&  ql != null ){
                List<ChoiceBean> clist = QuestionList.getChoiceList();           
                   assuming that you have created a serach method which searches the entire choice list and would give you
                   the index of that object which is being refered by unique choiceid and returns -1 if not found
                int index =  QuestionList.search(choiceid);
                if(index != -1){
                   ChoiceBean cb = clist.get(index);
                   buffer = cb.getImage();
            if(buffer != null){
                 // assuming that we have stored images in JPEG format only
                 JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(new ByteArrayInputStream(buffer));
                 BufferedImage image =decoder.decodeAsBufferedImage();
                 response.setContentType("image/jpeg");
                 // Send back image
                 ServletOutputStream sos = response.getOutputStream();
                 JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
                 encoder.encode(image);
            } else {
               response.setContentType("text/html");
               response.getWriter().println("<b>Image data not found</b>");              
    }However,i still feel there are few loopholes with this approach where Application Server can eat up a lot of heap space which may result in outofmemorybound exception.
    Hope this might help :)
    REGARDS,
    RaHuL

  • How to display images on my internal isight?

    Hi,
    I just bought the new iMac 2 gig dual. Running on 10.5.2.
    I wanted to know how to display images on my screen during a video conference chat without resorting to holding up a print out to the camera? I need something where I can switch from video mode to image mode and show a single image at a time if I need to. All that while still talking of coarse. If it isn't possible with my iSight software, can you point me to other software I can download and still use my built in cam?
    I hope I was clear enough in asking this.
    Thanks
    Liban

    Welcome to Apple Discussions, Liban
    iChat can do what you want, but I do not know of any web-based video chat site that can.
    Look for Help or Support information on the site you are using or ask the Webmaster if his site has the capability to do what you want.
    EZ Jim
    PowerBook 1.67 GHz w/Mac OS X (10.4.11) G5 DP 1.8 w/Mac OS X (10.5.2)  External iSight

  • How to display image in database using html or php

    i've try already to work this thing but i can't do it. anyone that can help me or give me any example or reference to resolve my problem to retrieve or display image(blob) from database. hope that all of you help me

    Using JHeadstart, you can display a BLOB column from the database in HTML, by way of ADF. Check out the JHeadstart Tutorial at http://www.oracle.com/technology/products/jdev/tips/muench/jhstutorial/index.html to get started, then do the same for your own database tables that include the BLOB column. JHeadstart will take care of rendering it as a file upload or image, depending on the display type you set at the attribute level.
    Hope this helps,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • How to display a BLOB column in ADF.

    How to display a BLOB column in ADF.

    hi agowlikar786
    Maybe the forum thread "ADF BC : download BLOB " can help
    at ADF BC : download BLOB
    regards
    Jan

  • How to read bytes(image) from a server ?how to display image after read byt

    How to read bytes(image) from a server ?how to display image after reading bytes?
    i have tried coding tis , but i couldnt get the image to be display:
    BufferedInputStream in1=new BufferedInputStream(kkSocket.getInputStream());
    int length1;
    byte [] data=new byte[1048576];
    if((length1=in1.read(data))!=-1){
    System.out.println("???");
    }System.out.println("length "+length1);
    Integer inter=new Integer(length1);
    byte d=inter.byteValue();

    didn't I tell you about using javax.imageio.ImageIO.read(InputStream) in another thread?

  • How to Ftp a Blob attachment in a table using osb service

    How to Ftp a Blob attachment in a table using osb service
    I tried with DBadapter select it does not work ... For blob objects cant use select throws error as expected number got blob
    can call a stored procedure to write the file to some directory but that file will not be created with the same name of the file as stored in DB .. need to hard code the filename in utl file or if we pass a variable to get the name of the attachment file we have to use select query in cursor which throws error like above in step 2
    Can some body tell me how to get the blob attachment with the same name as it is stored in DB table
    Edited by: user13745573 on Jan 31, 2011 4:35 AM

    Hi,
    I want to send an attachment through email.
    But I want to pick the file from say local drive then how can i specify the path of the file in file name.
    Also, i dont want ot append the conent from payload to the file. i wanted to sendthe file as is.
    <ema:attachment>
    <ema:name></ema:name>
    <ema:type>text/plain</ema:type>
    <ema:content/>
    </ema:attachment>
    Please help.

  • How to display a blob image in RTF template's Header.

    Hi,
    I want to display a blob image (logo company) in my RTF template,
    my problem is how i can display this image in the template's Header.
    I tried this
    <?
    <fo:instream-foreign-object content-type="image/jpeg" >
    <xsl:value-of select=".//LOGO"/>
    </fo:instream-foreign-object>
    ?>
    but was unsuccessful
    Thanks in advance.

    I tried this
    <?
    <fo:instream-foreign-object content-type="image/jpeg" >
    <xsl:value-of select=".//LOGO"/>
    </fo:instream-foreign-object>
    ?>
    but was unsuccessful
    sure
    what is red elements ?
    you template can be looks like
    ..... some data .....
    ( after  all data )
    <?template:footer_logo?>
    <fo:instream-foreign-object content-type="image/jpeg" ><xsl:value-of select=".//LOGO"/></fo:instream-foreign-object> (as field )
    <?end template?>
    <?call-template:footer_logo?> ( in header/footer )
    some remarks https://oralublog.wordpress.com/2014/10/04/bi-publisher-11g-footers-and-headers-in-rtf-template/

  • How to display images from BLOB column via APEX 4.0

    Hello,
    I did the following in order to display images of two Oracle records on the APEX page. I am using APEX Version : 4.0.1.00.03 , Oracle DB Version : 10.2.0.4.0.
    1. Created An oracle table TEST_FORM
    with 3 columns
    ( ID number, MIME_TYPE varchar2(255) , Image BLOB )
    2. Inserted two records
    10001, image/gif, ( actual image1)
    10002, image/gif, ( actual image2)
    3. created an Oracle procedure
    CREATE OR REPLACE PROCEDURE show_my_form ( p_image_id IN test_form.id%type) AS
    l_mime test_form.mime_type%type;
    l_length NUMBER;
    l_file_name VARCHAR2 (2000);
    lob_loc test_form.IMAGE%type;
    BEGIN
    SELECT mime_type, IMAGE
    , DBMS_LOB.getlength (IMAGE)
    INTO l_mime, lob_loc, l_length
    FROM test_form
    WHERE id = p_image_id;
    owa_util.mime_header(l_mime, false);
    htp.p ('Content-length: ' || l_length);
    owa_util.http_header_close;
    wpg_docload.download_file (lob_loc);
    END show_my_form ;
    4. In Apex 4.0
    step1. Created an interactive report on a new APEX page
    step2. Specified the following in the Region Source
    select id, mime_type, '<img src="#OWNER#.show_my_form ?p_image_id=#ID#" />' photo
    from TEST_FORM
    The column result shows as <img src="CCS.show_my_form?p_image_id=#ID#" />
    I am unable to display the column image as a link to a proper image photo.
    Could you please advise me if I missed anything ?
    Thanks a lot.
    Regards
    Susanna
    Edited by: user10318332 on 13/12/2010 15:51
    Edited by: user10318332 on 13/12/2010 20:10

    Maybe the space you have before the ? is causing issues. there shouldn't be any space.
    Your procedure looks to be much the same of one that I have.
    Have you granted execute on your procedure?
    Also, what version DB are you running? This could be another issue: http://daust.blogspot.com/2006/04/xe-calling-stored-procedures.html
    But anyway, you don't need to create your own procedure these days. You could do the following:
    in your query, have a column: dbms_lob.getlength(blob) photo ; save, then in column attributes for that column, apply a format mask. There is usually a link below the text box for the format mask - BLOB Download Format Mask, which will help you build the format mask. But it is documented here: http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/advnc.htm#BCGGJHEF
    Ta,
    Trent

  • How to display Images stored in a database using javascript

    Hi.
    I have some images stored in a table and I need to display them using javascript. The images are stored in BLOB columns: I would like to know if I can put them on a directory and then get it from there using BFILENAME function.
    Any suggestion?
    Regards,
    Jeannine

    Hi All,
    Yes DuraiRaja - i am using the document.getElementById(' ').
    In my app, I have a Main controller calling a View - Default.HTM,
    This Default.HTM, in turn loads up three trays T1, T2, T3 and these tray elements in turn call up the controllers ctrl1, ctrl2, ctrl3 associated to them.
    CTRL1 calls a view - View1 - V1.htm, which has the below code.
    And on the below page all that i am trying to do is validate if "FieldVal" is blank or not.
    I get an error on IE as "Object required"
    I get a HTTP 501/505 error when i try to upload the code.
    Thanks all !

Maybe you are looking for

  • White line across screen.

    Here's a picture of the problem http://i139.photobucket.com/albums/q319/Rob1302_album/ipodfk.jpg?t=1231786566 You can see the line across the top which stays on every screen. I haven't used my ipod in about a week and this wasn't there before. I turn

  • Change item value at Sales Invoice form before create a document

    HI, I am trying to change value for "TrackNo" item on the sales invoice form just before create a sales invoice, I have the following code: Dim oForm As SAPbouiCOM.Form Dim oItem As SAPbouiCOM.Item Dim oEdit As SAPbouiCOM.EditText Dim periodo As Stri

  • Converting a long document

    I have a 500 page book I want to convert to Word .docx.  Adobe says it's taking too long, so it stops.  What can I do?

  • Webdynpro application with multiple DCs

    Hi, I have an application where it is splitted in to multiple DCs for the team development. Now at runtime there are navigation happenening across DCs, means on click of a button in view1 of DC1, it needs to call view2 of DC2. What is the best way to

  • Certain pdf pages do not get printed but print blank

    I am a mac user (OS X Yosemite v. 10.10.2) and have used acrobat xi pro 11.0.10. I notice once that some pages did not print from a pdf and after updating all drivers of the printer still I have the same problem. My printer is Canon ImageClass MF 858