Apex_util.get_blob_file?

Dears ,
i want to display the image in sidebar region , i make all steps :
1- add column in the table
( FLAG   blob ,
FILENAME  varchar2(4000),
MIMTYPE  varchar2(4000),
FILESIZE   varchar2(4000)
)2- create new region html type and but in condition PL/SQL function body return boolean
declare
begin
  if :P11_COUNTRY_ID is not null then
    for c1 in (select nvl(dbms_lob.getlength(flag),0) l
               from TM_COUNTRIES
               where COUNTRY_ID = :P11_COUNTRY_ID)
    loop
      if c1.l > 0 then
        return true;
      end if;
    end loop;
  end if;
  return false;
end;3- under region i add item page type as display only , in PL?SQL function body i put this code
return '<img src="'||apex_util.get_blob_file_src('P11_FLAG',:P11_COUNTRY_ID)||'" />';in condition type Exists (SQL query rturn at least one row )
SELECT MIMTYPE from TM_COUNTRIES where COUNTRY_ID = :P11_COUNTRY_ID and MIMTYPE like 'image%'after run the page the image not display , but i found this error in the region
<img src="apex_util.get_blob_file?a=100&s=208992680627601&p=11&d=5841075134700438&i=5840352480700430&p_pk1=83&p_pk2=&p_ck=2DEC9AEF47B40880203EF3AEF6C597D5" />
please advice
Thanks
Maie

Hi,
3- under region i add item page type as display only , in PL?SQL function body i put this code Why do not use Display Image Item Type ???
Regards,
Fateh

Similar Messages

  • ApEx 3.1 BLOBs, /pls/apex/apex_util.get_blob_file not found on server

    Hi all
    I'm trying some of the enhanced BLOB functionality in one of our apps as it could really make life easier for our users.
    We have a table with 4 BLOBs that the user can use to upload various documents.
    The upload (insert / update) seems to be working OK and as far as I can tell is making it through to the database table (I've checked using dbms_lob.getlength).
    However the 'Download' link provided on the form I can't get to work for love nor money. I always get this error in the browser (all browsers) :
    The requested URL /pls/apex/apex_util.get_blob_file was not found on this server.Checking the Apache log file (we're using mod_plsql) I see that :
    [Mon Apr 07 15:46:20 2008] [error] [client XX.XX.XX.XX] [ecid: 1207579580:192.168.20.2:2060:280:1501,0] mod_plsql: /pls/apex/apex_util.get_blob_file HTTP-404 ORA-00900: invalid SQL statement\nORA-06512: at "SYS.WWV_DBMS_SQL", line 196\nORA-06512: at "FLOWS_030100.WWV_FLOW_DML", line 1537\nORA-06512: at "FLOWS_030100.HTMLDB_UTIL", line 1532\nORA-06512: at line 22\nHas anyone else seen this? I have used this function successfully elsewhere but can't work out why it's not working on this page. I have defined (and assigned) mimetype, filename & updated date columns...
    The built link looks like this :
    http://<server>/pls/apex/apex_util.get_blob_file?a=105&s=935234205856194&p=32&d=6525565218047259&i=1070820865186800&p_pk1=282&p_pk2=10&p_ck=607EA2AE0D32BCB66F3857A0458E2550&p_content_disposition=attachmentThe values for p_pk1 and p_pk2 seem correct and the a (app id) is correct also.
    Thanks,
    Steve

    Steve,
    Thanks for reporting this issue. We have a known bug in APEX 3.1 which does not let you work declaratively with BLOBs when you have multiple blobs per table. We hope to have this fixed in a patch. We also need to post it on our known issues page for interactive reports.
    Mike

  • DL link : apex_util.get_blob_file was not found on this server

    I'm trying to make a DL link using GET_BLOB_FILE_SRC and so far no luck.
    If you please can take a look here : http://apex.oracle.com/pls/otn/f?p=11910:9:276337790571189::YES:::
    login/pass - guest/tango&cash
    Page 9.
    I pass product number = 1 in the element P9_TXT1 and expect to see HREF in the element P9_X which i should be able to DL.
    But the html is
    <a href="apex_util.get_blob_file?a=11910&amp;s=276337790571189&amp;p=9&amp;d=&amp;i=4242569802061169120&amp;p_pk1=1&amp;p_pk2=&amp;p_ck=5E253F61CC71868127E0440E823E383E">Download</a>Which "haply" produces :
    The requested URL /pls/otn/apex_util.get_blob_file was not found on this server.
    I double check that i'm calling apex_util.get_blob_file_src function.
    Edited by: andrey on Jul 12, 2009 8:54 PM
    pass
    Edited by: andrey on Jul 12, 2009 9:01 PM

    The PL/SQL Function source value for the item is:
    RETURN 'Download' ;
    ...and the format mask for the item is:
    DOWNLOAD:DEMO_PRODUCT_INFO:PRODUCT_IMAGE:PRODUCT_ID
    I don't think this was meant to be used this way. I think you need a DML process to refer to 9see the &d= parameter value is null in your link).
    What documentation were you using that led you to try this?
    Scott

  • APEX 4 - apex_util.get_blob_file 404

    Hi
    I'm getting the following error after upgrading to APEX 4.0
    apex_util.get_blob_file HTTP-404 ORA-20544: Invalid table owner\nORA-06512: at "APEX_040000.WWV_FLOW_DML", line 1628\nORA-06512: at "APEX_040000.HTMLDB_UTIL", line 2226\nORA-06512: at line 22This is generated by the following PLSQL call
    apex_util.get_blob_file_src('P5_CUSTOMER_LOGO',cust_id)The underlying view is owned by another schema but it has granted select,insert,update,delete access to the application parsing schema. This was working Ok in 3.2.
    Any help would be appreciated....
    Cheers
    Matt

    Hi Matt,
    I looked at the offending line which is raising this exception. A check was added in APEX 4.0 to determine if the table owner was different than the parsing schema, and if it was different, then verify if the table owner is mapped as a schema to the workspace.
    Here's the kicker, though - I'm not convinced that this check needs to be this restrictive. I'll review this with the developer who made this change and reply back to this thread.
    Joel

  • Showing image instead of download link

    I am using an interactive report and entered this for the source. I want to show the picture instead of a download link however I don't get the picture I get a
    Source:
    select "IMAGE_ID",
    "SUBJECT",
    "CREATED_DATE",
    "CREATED_BY",
    decode(nvl(dbms_lob.getlength(image),0), 0, null, '<img src=
    "'||apex_util.get_blob_file_src('P53_IMAGE', image_id)||
    '" height="75" width="75" />') Image
    from "#OWNER#"."IMAGES"
    Shown in the report:
    <img src= "apex_util.get_blob_file?a=100&s=3229276571420106&p=53&d=1943731550155986&i=1941402717155956&p_pk1=1&p_pk2=&p_ck=58C90FE7F1EC9618676F23C2FC24FA0A" height="75" width="75" />
    Any idea as to what I may be doing wrong?

    Hi ,
    It looks like your report column is set to display as Text. Go to "Home>Application Builder>Application #>Page #>Interactive Report Attributes" and change it to Standard report Column and you should be all set.
    Thanks,
    Manish

  • Image is not displayed in APEX Form with APEX utility Function

    Dear APEX experts,
    As i am new to the oracle apex development. I have just created the basic employee information form in which i upload the photograph of the employee. The photograph gets uploaded but it does not display properly. I have already referred the sample database application to display the image. Moreover, i have followed the same steps as it is used to display the product image in that application. Still i am unable to get result. I am getting following output:
    <img src="apex_util.get_blob_file?a=35682&s=101496289174102&p=15&d=10639237623242912156&i=10639236703270912154&p_pk1=21&p_pk2=&p_ck=FCA12832591A1C706D76FDD589E551A2" />
    Please help me seniors to solve this issue. How to display the image using this utility.

    mehpandya wrote:
    I have observed following HTML code after inspecting the two application.
    1.Sample Database application:
    In this application , the product image is uploaded and displayed correctly and following code is rendered in the HTML source.
    <span id="P6_IMAGE" class="display_only" ><img src="apex_util.get_blob_file?a=64703&s=134073736366663&p=6&d=25732916709090782422&i=25433760606377189086&p_pk1=1&p_pk2=&p_ck=7E23190CC0BFE98BBE4CCE2ADFBBEF26" /></span>
    2.Sample HRMS Application - Which i have created for learning.
    In this application , the employee photo is uploaded but it is not displayed correctly. Following is code is rendered in the HTML.
    "<span id="P15_EMPIMG" class="display_only" >&lt;img src="apex_util.get_blob_file?a=35682&amp;s=100541516379272&amp;p=15&amp;d=10639237623242912156&amp;i=10639236703270912154&amp;p_pk1=21&amp;p_pk2=&amp;p_ck=31A8328E0F5754D7CBD0FC0C6313B38A" /&gt;</span>"
    Hence , in my application the code is not rendered perfectly and syntax is not completed.
    following characters are rendered like this.: &lt , &quot , &gt , &amp.
    So, is this the reason of not displaying the image???Yes.
    To get a Display Item to render as HTML, in the item definition Security section set Escape special characters to No.
    For a report column, ensure the Display Text As report column attribute is Standard Report Column rather than the default Display as Text (escape special characters).
    Use a Display Image item and declarative BLOB support instead of this clunky manual method.
    Please read the FAQ and forum sticky threads (if you haven't done so already.
    You'll get a faster, more effective response to your questions by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s)
    The APEX documentation is here.

  • How to download a file from a table not in the parsing schema

    We have a table in another schema which holds files in a blob column. I can create a form on this table and the file upload works fine. The file browse page item has the source as the blob column and storage type "BLOB column specified in Item Source attribute". The download link generated for the page shows a call to apex_util.get_blob_file and the parameters are correct. However, when you click on the link you get a Page Not Found 404 error. Same error in Apex 4.1.1. The plsql error is:
    ORA-20544: Invalid table owner
    ORA-06512: at "APEX_040000.WWV_FLOW_DML", line 1628
    ORA-06512: at "APEX_040000.HTMLDB_UTIL", line 2244
    ORA-06512: at line 31
    Is there a way to use apex_util.get_blob_file to download a file when the table is in another schema?
    Rod West

    Hi,
    I am not sure that the post explains everything as the "Automatic Row Processing" and "Automatic Row Fetch" process work fine on this page and therefore security should not be an issue.
    Thanks for the view suggestion, but I am not sure that a view is a good option for us because the parsing schema does not have create view privilege and therefore the view would be difficult to install and maintain. We will problably end up with a custom download file process.
    Rod West

  • How to Display an Image on my FORM

    Good Day!
    I would like to ask some help from you guys with my problem on how to display an image on my form. I would like to display my uploaded image on my form but instead of an image, the get_blob_file is showing. By the way, I'm using Apex 4.1
    I downloaded the Order Entry Sample Application and followed the Page 6, the Product Details. I even made snapshots of each details from Page Rendering to Page Processing in order not to miss a thing.
    At the moment, I was able to upload or store the image on my created Oracle table and also able to retrieve it on the Download Link Text with Content Disposition value of Inline, provided by APEX Settings. If I invoke the Download link beside the file browser, a page with the image will be shown, below is the address:
    http://127.0.0.1:8080/apex/apex_util.get_blob_file?a=200&s=339877802936975&p=230&d=7107921433296839&i=7107601420296838&p_pk1=54&p_pk2=&p_ck=7D6512D967336C4B94258EEA3CDF1BE6&p_content_disposition=inline
    However, instead of showing the image on a region, below is the one showing on my Form:
    <img src="apex_util.get_blob_file?a=200&s=339877802936975&p=230&d=7107921433296839&i=7107601420296838&p_pk1=54&p_pk2=&p_ck=7D6512D967336C4B94258EEA3CDF1BE6" />
    As you can see the parameter values are the same but I know I missed something that's why I'm here :)
    I would highly appreciate all the help you can provide and many thanks in advance.
    I tried to change gear by making an html region of type PL/SQL (anonymous block) and a procedure but still no image :(
    Below are the scripts.
    declare
    cursor cur is
    select *
    from wsemployee
    where empid = :P230_EMPID;
    begin
    for rec in cur
    loop
    IF rec.mime_type is not null or rec.mime_type != '' THEN
    htp.p( '<img src="my_image_display?p_image_id='||NVL(rec.empid,0)||'" height="'||100||'"/>' );
    else
    htp.p( 'No Image ');
    END IF;
    htp.p( ' ');
    end loop;
    end;
    PROCEDURE
    create or replace PROCEDURE my_image_display( p_image_id IN NUMBER)
    AS
    l_mime VARCHAR2 (255);
    l_length NUMBER;
    l_file_name VARCHAR2 (2000);
    lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, PHOTO_BLOB_CONTENT, PHOTO_FILENAME,DBMS_LOB.GETLENGTH(photo_blob_content)
    INTO l_mime,lob_loc,l_file_name,l_length
    FROM wsemployee
    WHERE empid = p_image_id;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    owa_util.mime_header( nvl(l_mime,'application/octet'), FALSE );
    -- set the size so the browser knows how much to download
    htp.p('Content-length: ' || l_length);
    -- the filename will be used by the browser if the users does a save as
    htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(l_file_name,instr(l_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    -- close the headers
    owa_util.http_header_close;
    -- download the BLOB
    wpg_docload.download_file( Lob_loc );
    END my_image_display;
    Edited by: user13831927 on Dec 22, 2012 3:24 PM

    Hi Ying,
    you can add a UDF to the table spp2 with a programm
    but the table is not yet listed in the 'Manage User Fields' form.
    there's no way to "enable" it - sorry

  • Displaying a blob image in a report and form

    Hello all,
    Can anyone help me. I have a deadline after two days and I want to fix this as soon as possible.
    I am using Application Express 4.1.1.00.23.
    My problem is in displaying an image retrieved from a table. In my table, I have created these fields to upload the image:
    "IMAGE" BLOB,
    "MIMETYPE" VARCHAR2(255),
    "FILENAME" VARCHAR2(400),
    "IMAGE_LAST_UPDATE" DATE,
    They were uploaded successfully. Then I created a report to select all attributes from table. The blob attribute was displayed as (unsupported data type).
    and when i link this report to a form the image appear as a link (<img src="apex_util.get_blob_file?a=50435;s=293574445128601&p=29&d=65102984724474793498>)
    I will be very grateful if anyone tell me how to display the image in the table and form.
    Thanks in advance,
    Sara

    >
    Please update your forum profile with a real handle instead of "941348".
    Hello all,
    Can anyone help me. I have a deadline after two days and I want to fix this as soon as possible.
    I am using Application Express 4.1.1.00.23.
    My problem is in displaying an image retrieved from a table. In my table, I have created these fields to upload the image:
    "IMAGE" BLOB,
    "MIMETYPE" VARCHAR2(255),
    "FILENAME" VARCHAR2(400),
    "IMAGE_LAST_UPDATE" DATE,
    They were uploaded successfully. Then I created a report to select all attributes from table. The blob attribute was displayed as (unsupported data type).
    and when i link this report to a form the image appear as a link (&lt;img src="apex_util.get_blob_file?a=50435;s=293574445128601&p=29&d=65102984724474793498&gt;)
    I will be very grateful if anyone tell me how to display the image in the table and form.
    See <a href="http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/advnc_blob.htm">+About BLOB Support in Forms and Reports+</a>.
    There's an <a href="http://apex.oracle.com/pls/apex/f?p=44785:24:2328375591211372::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:4100,2">OBE tutorial </a> that followed the introduction of declarative BLOB support in 3.1 as well. (An earlier version but it is still relevant to APEX 4.x.)
    (Please make an effort to consult the documentation and thoroughly search the forum for previous coverage of a topic. This is a much discussed question.)

  • Link to file (blob) with 2 primary keys

    I am experiencing a problem in APEX 3.1.2 with viewing files uploaded through a simple form based on a table. If that table has a single column primary key, the link works perfectly. If the table has a two column primary key, the link throws a "pls/apex/apex_util.get_blob_file not found on server". I made a simple test case and if I change the table to use a 1 column PK, (and change the process on the APEX form to match), the link works. When I change the PK back to 2 columns (and the APEX processes), the link stops working on the same record. Is this a known issue? I couldn't find anything useful in Metalink or these forums.
    I may be missing something obvious, but could someone repeat this test case and let me know if you encounter the same thing?
    1) Create table called test_blob with columns
    id1 number
    id2 number
    file_blob blob
    filename varchar2
    mimetype varchar2
    update_date date
    and a primary key of id1 only
    2) Create an APEX form based on that table and configure the file browse item source with the mimetype fields, filename field, .... (You'll need to unhide the id1 field unless you bothered creating a trigger,etc to populate it)
    3) Upload the document, PDF, ... of your choice
    4) Go back to the form on that record and click the download link. It should work to open the file
    5) Change the primary key on the table to use id1 and id2 and change the processes on the APEX form to use the 2 column primary key
    6) Repeat step 4, but now the link no longer works. If you toggle back to the 1 column PK, the link works again.
    I worked around it by making a new column that concatenates id1 and id2 so I can move my application forward with a 1 column PK, but this is frustrating. BTW, I did try to use the get_blob_file_src API to work around the problem, but the link it generates is identical to that generated automatically so the same problem occurs.
    Rgds/Mark M.

    It rather depends on what access you have and what the keys are, but for my table:
    1) Drop existing primary key constraint
    2) Add a new column called something like key_id
    3) Change your trigger which currently sets your existing id to also set the new key_id by setting key_id := id1 || ' ' || id2;
    4) Add new primary key constraint for new column
    Note that to do these changes, you may need to empty the table.
    Rgds/Mark M.

  • Display a blob column in a classic report

    We are using Apex 4.0, and trying to display a blob on the report using: decode(nvl(dbms_lob.getlength(ci.photo),0),0,null,'<img src="'||apex_util.get_blob_file_src('P2_PHOTO',ci.ci_nbr)||'" height="75" width="75" />') img. What appears on the report is:
    <img src="apex_util.get_blob_file?a=101&s=4433607511119466&p=2&d=4632627567686552&i=6506227756338792&p_pk1=1202016&p_pk2=&p_ck=B45D690EDA38F565BB6AC2BC859E2F0F" height="75" width="75" />
    I am following the example in apex.oracle.com, your help will be much appreciated.
    David.

    Thanks for the response Jeffe, I did change the attribute to standard report column and I think it is going the right direction but now I am a blank box with a smaller box in the upper left corner with a red x in the box. If you have any ideas about this one that would be great.

  • Image problem in V4.0

    Hi,
    Previously I had lots of problems with showing a BLOB image from a table
    in a report using the apex_util.get_blob_file_src function.
    Varad put me right on several ocassions: see the thread at
    Confusion with get_blob_file_src
    Eventually everything went well, and I got my images of a specific size on the screen.
    In the last month or two, the host database that I rent went up from version ten to version
    eleven, and the apex version changed too from 3.2.1 to some version of 4.
    I've only now discovered that the images don't display any more. I've re-read the thread
    mentioned above but can see no deviation from Varad's sterling advice. It still doesn't work,
    so my current guess is that something has changed when Apex went to its new version.
    Can anyone point me in the right direction regarding Image problems in version 4 ?
    I guess I'm not the first to experience such issues, and a checklist of things to try would
    be most welcome.
    I've done a View->Source on the page that doesn't work, and the issue with a missing value
    for the "d=" parameter on the apex_util.get_blob_file seems to have recurred:
    src="apex_util.get_blob_file?a=130&s=1718106956127950&p=13&d=&i=25615931827270369&p_pk1=5&p_pk2=&p_ck=947078FC54BB5126E7E0D19F8A24C416"
    Suggestions welcomed please; thankyou in advance.
    Mungo

    Hi Folks,
    I've found a solution to my "image" problem that caused this thread, hence the decent thing is to
    post it here.
    I read various other threads and stumbled across:
    PDF viewing with  apex_util.get_blob_file_src not working with 4.0
    PDF viewing with  apex_util.get_blob_file_src not working with 4.0 &# 4404695
    That thread mentioned the requirement for an "Automated Row FETCH" process as well as having
    an "Automated Row PROCESSING" process too.
    I had the latter, but didn't have the former, so throwing caution to the wind I tried adding a dummy
    Automated Row Fetch process and the damn thing worked!
    Haven't got a clue why on earth either of these are requirements on a page that is selecting data
    from the database - I don't understand where such processes are called in the big scheme of things.
    That's just me baiting some kind soul to spell out the fundamentals for this idiot... please?
    Happy to be corrected on any points.
    Regards until the next crisis...
    Mungo :-)
    P.S. How come there is no reasonable way to get the URL of a single post in a thread - I'd like to give
    reference to the single post that helped me, but all I seem to be able to get is the whole blooming thread.
    Suggestions?
    Edited by: MungoHenning on Sep 15, 2010 1:39 PM

  • Problems displaying photo

    Hi All,
    In the first place, I've already searched for this topic and I didn't find any suitable solution, maybe that's because I'm a newbie.
    Windows XP
    Oracle XE 11.2
    APEX 4.0.2.00.09
    It is a school application. 3 Pages.
    Page 1: login
    Page 2:
    HTML Text with an automatic row fetch sowing pupils data, also there is an item DISPLAY IMAGE called P2_DISPLAY_FOTO that reference the actual database column containing the BLOB, everything works great.
    I can see the pupils data with corresponding photo.
    There is a button (named TEST) that will redirect to Page 3.
    There is an After Region Computation that will store
    the BLOB information into a hidden item called P3_DISPLAY_FOTO. This is a pl/sql Function Body, and this is what it does:
    return '<img src="'||apex_util.get_blob_file_src('P2_DISPLAY_FOTO',:P2_ALUMNOS_DNI)||'" />';
    P2_ALUMNOS_DNI is the primary key for the table containing the BLOB column.
    Page 3:
    This page will be used to perform some calculations for the chosen pupil from Page 2, and I need to show data from previous Page 2, such as Name, Last Name, and PHOTO.
    The thing is, I DO NOT WANT TO ACCESS DATABASE AGAIN TO GET THE BLOB and name and last name, I'm trying to avoid unnecessary database queries.
    There is no problem to show again pupil name and last name. But I cannot display the corresponding photo.
    In order to display the photo again, this is what I did:
    - I created a subregion as html text with shortcuts
    - defined as region source = &P3_DISPLAY_FOTO.
    wich has been set on Page 2 after region computations
    Well, it does'n work, the sub region will show the following string:
    <img src="apex_util.get_blob_file?a=103&s=326193120935733&p=2&d=7366714062123782&i=8726421562708554&p_pk1=20912349&p_pk2=&p_ck=0B5CD62FA1A56005CA6AB150510F60C3" />
    The strange thing is:
    I tried to replace the region source
    &P3_DISPLAY_FOTO.
    for
    <img src="apex_util.get_blob_file?a=103&s=326193120935733&p=2&d=7366714062123782&i=8726421562708554&p_pk1=20912349&p_pk2=&p_ck=0B5CD62FA1A56005CA6AB150510F60C3" width = "200px" />
    and it works.
    I also tried to define the sub region with region source=
    htp.p('<div class="sparepartImgContainer">');
    htp.p('&P3_DISPLAY_FOTO.');
    htp.p('</div>');
    but it doesn't work either.
    Hope my explanation is clear.
    I'll try testing some other ideas in the meanwhile...
    any ideas will be appreciated.
    Thank you
    Regards.
    Found how to fix this.
    On Page 2, I changed the P3_DISPLAY_FOTO computation
    from
    return '<img src="'||apex_util.get_blob_file_src('P2_DISPLAY_FOTO',:P2_ALUMNOS_DNI)||'" />';
    to
    return ' '||apex_util.get_blob_file_src('P2_DISPLAY_FOTO',:P2_ALUMNOS_DNI)||' ';
    And I changed Page 3 sub region region source
    from
    &P3_DISPLAY_FOTO.
    to
    <img src=&P3_DISPLAY_FOTO. />
    Now everything works great.
    Sorry to disturb you all.
    Regards
    Edited by: CJR on May 15, 2013 6:28 AM

    CJR wrote:
    There is an After Region Computation that will store
    the BLOB information into a hidden item called P3_DISPLAY_FOTO.By way of explanation, hidden page items cannot be used to contain HTML code. For security reasons they are always HTML-escaped when referenced as static text substitution strings.
    If you must store HTML code in session state and access it using static text substitution (not recommended) then use an application item.

  • Inconsistent Links w/ GET_BLOB_FILE_SRC

    Hello,
    I have a region that includes a link to a BLOB using GET_BLOB_FILE_SRC. I have placed this region on Page 0 so that it repeats in the sidebar of every page. On some pages the link works as expected and downloads the BLOB. However, on one particular page, the link produces a "PAGE NOT FOUND" error. The syntax for the SQL to retrieve the BLOB is:
    CASE WHEN
    NVL(dbms_lob.getlength(V_CONTENTS),0) = 0
    THEN
    NULL
    ELSE
    '<*a href="'||apex_util.get_blob_file_src('P35_V_CONTENTS', "CC_MEMBERS"."ID")||'" title="Download vCard"><img src="'||:WORKSPACE_IMAGES||'vcard.jpg" /></a>'
    END as VCARD
    * ignore the asterik, I had to add it to the post so Forums wouldn't literally interpret the "<a" tag.
    The page(s) that works produce the URL:
    http://localhost:8080/apex/apex_util.get_blob_file?a=101&s=8396757249800286&p=35&d=9761778854785863315&i=9761771846677734677&p_pk1=442&p_pk2=&p_ck=8170B24863751BFB4ACE607D74A58889
    While the errant page produces:
    http://localhost:8080/apex/apex_util.get_blob_file?a=101&s=4253543627310563&p=35&d=11872333539480757720&i=9761771846677734677&p_pk1=442&p_pk2=&p_ck=E9838B87034D4D9F19B7F85997953342
    Any suggestions as to what might be the problem?
    Edited by: jritschel on May 26, 2009 12:17 PM
    Edited by: jritschel on May 26, 2009 12:24 PM

    Those were from different sessions, but the results are the same. Here is an example from the same session:
    Failed Link -
    https://localhost:8080/apex/apex_util.get_blob_file?a=19038&s=927230068543966&p=35&d=14744341426526826663&i=12633779733723803620&p_pk1=401&p_pk2=&p_ck=F0F812A0BEFBB5832F39BB942AA0BCEA
    Working Link -
    https://localhost:8080/apex/apex_util.get_blob_file?a=19038&s=927230068543966&p=35&d=12633786741831932258&i=12633779733723803620&p_pk1=401&p_pk2=&p_ck=8415F41A1E002BE095CD2817842B8A30
    The d= parameter seems to be the one that differs between the working/non-working pages. Do you know what that represents and where it gets assigned? I do have several links on each page that point to different BLOB records in the same table and the behavior is consistent in that either all links work or fail on a given page.
    I've also done some further testing and it looks like this error is happening mostly on pages where I have links to BLOBs coming from two different ables on the same page.

  • Bug Report: Images broke when using get_blob_file_src and not authenticated

    Hi,
    it looks like that images which are retrieved with a
    apex_util.get_blob_file
    call are broken when the user is not authenticated. If the generated image URL is directly called in the browser, it shows a 404 Not found error with a "Invalid Session" in the error log file on the Apache.
    The above image URL is generated when using the apex_util.get_blob_file_src function call. If the new IMAGE format mask (eg. in an IRR) is used it seems to be fine, because that generates a apex_util.get_blob call.
    Testcase:
    1) http://apex.oracle.com/pls/otn/f?p=17201:3 (That's the sample application with page set to "doesn't need authentication")
    -> Image column is broken
    2) Login with demo/patricks_demo_workspace
    3) Go again to page 3 (Products)
    -> Image column is displayed correctly
    Thanks for looking into that
    Patrick
    Oracle APEX Essentials: http://essentials.oracleapex.info/
    My Blog, APEX Builder Plugin, ApexLib Framework: http://www.oracleapex.info/

    Hi Scott,
    when I woke up today it also came into my mind that it may has something to do with the referenced P6_PRODUCT_IMAGE in the
    apex_util.get_blob_file_src('P6_PRODUCT_IMAGE',p.product_id)call which references a page item on a non-public page.
    I think apex_util.get_blob_file_src or better apex_util.get_blob_file shouldn't really care if the "definition" of how the BLOB looks like and where to read the information from is on a non-public page. Because it doesn't read or set actual data it just reads the definition, so it shouldn't be a security issue.
    Another question is, if it's so useful to reference a page item to get this BLOB information and not directly being able to specify this information as parameters in the apex_util.get_blob_file_src call. I think I also raised that during the 3.1 beta, because in case if you just want to display a BLOB you still have to create somewhere a page item of type "file browser" to being able to reference it in the get_blob_file_src call. Direct passing of the vales would also be more transparent and self documenting.
    BTW, the above code is an example of the "Sample Application" and wasn't made up by me, so probably a lot of people are using this technique to get rid of there own blob download procedures.
    Have a nice weekend
    Patrick
    Oracle APEX Essentials: [http://essentials.oracleapex.info/]
    My Blog, APEX Builder Plugin, ApexLib Framework: [http://www.oracleapex.info/]

Maybe you are looking for

  • Error when trying to set a date type edit field

    Hi all I have an edit text field in a form which is bounded to a date type database field using dbDataSource. When i try to set the edit text field value with Today's date by code. I recieve an error message that the value which i'm trying to set is

  • Is it possible to 'Load Up' the cursor with several 'Place' items?

    It happens often enough that I have a folder with several items I want to place. I can go back and forth individually and command D to the folder window choose the next item and then place in the document. When there are page after page of items, it

  • Previews after an edit in photoshop - bad color

    OK, Monitor is calibrated. Images look fine in lightroom after import. Then I make some adjustments in the Develop module and pass the file off to photoshop CS2. I save the file and it shows up in lightroom as an (filename)-edit.psd. Great except tha

  • Default-locale setting is ignored!

    Hi gurus, i tried following: <application> <message-bundle>mymessagess</message-bundle> <locale-config> <default-locale>en</default-locale> </locale-config> </application> In my application the locale is still de. What have i done wrong? Or how can i

  • Automatic file load

    I have a page on my site called STUFF. There is a link on this page to another page which is frameset page. Within the main frame of this page I want a .pdf file to automatically load with a visitor clicks the link on the STUFF page. I know this may