Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Not able to display an image (blob)

828151Apr 8 2011 — edited Apr 11 2011
Hello guys,

I'm trying to show an image from a blob DB column but it's displaying only the html like:
 	<img height="300" width="400" src="apex_util.get_blob_file?a=601&s=567993277075644&p=5&d=2801303982743328&i=2792814858763700&p_pk1=64&p_pk2=&p_ck=06DD2DDFEB11FFA578D1D1BF37597DCF" title="Imagem do Produto"/> 
BUT i can download the image, I don't know what's wrong... my steps:

Created one Fecth Row over a view:
  CREATE OR REPLACE VIEW OF_PRODUTO_V AS
    SELECT PRO.PRODUTO_ID PRODUTO_ID,
         PRO.IMAGEM IMAGEM, -- blob
         PRO.ARQUIVO||'.JPG' IMAGEM_ARQUIVO, --image name
         'image/pipeg' AS MIMETYPE
    FROM PRODUTO_IMAGEM_ATM PRO; 
Item Containing Primary Key Column Value: P5_PRODUTO_ID
Primary Key Column: PRODUTO_ID

Then I created one page item "P5_PRODUTO_ID" Source Used:"Always, replacing any existing value in session state" Source Type: "Database Column" Source value or expression:"PRODUTO_ID".

Created one page item FILE BROWSE "P5_IMAGEM_DADOS" Storage Type: BLOB column specified in Item Source attribute, MIME Type Column: "MIMETYPE", Filename Column:"IMAGEM_ARQUIVO", Display Download Link: "YES".

Created one page item as Display Only "P5_IMAGEM" Source Used: "Always, replacing any existing value in session state" Source Type: PL/SQL Function Body,
Source value or expression:
return '<img height="300" width="400" src="'||apex_util.get_blob_file_src('P5_IMAGEM_DADOS', :P5_PRODUTO_ID)||'" title="Imagem do Produto"/>';
I'm following some examples, but I don't know what is wrong or not.

Thanks for help,
Alan Martini.

Edited by: Alan Martini on 08/04/2011 17:22
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 9 2011
Added on Apr 8 2011
2 comments
668 views