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!

Error in displaying BLOB column video in Static report APEX

Engineerr1983Apr 17 2024 — edited Apr 17 2024

Hi,

I'm using APEX free tier, trying to display video file (mp4) from BLOB column in a table.

I create an interactive report to display the table fields, but for the BLOB column video I created a separated region to view the video from BLOB column

I tried to put a code into PL SQL dynamic action as follows

Htp.p

(‘

<head>

\<meta content="text/html"; charset="utf-8" http-equiv="Content-Type">

\<title> HTML 5 Video \</title>

\</head>

\<body>

\<video width="600" height="400" controls="controls">

\<source src="'||APEX.UTIL.GET\_BLOB\_FILE\_SRC('P10\_VIDEO\_FILE',:P3\_ID\_VIDEO)||'" type="video/mp4">

\</video>

\</body>

‘);

But runtime error said it refused that code and it gave me an error saying that the Oracle APEX reference is out of scope

So I’ve changed the Region type to (Static contents), and put the same code into the HTML source code, but without (htp.p)

And the runtime error gone.

I changed the (ID) column in the interactive report page – or the video ID – type to (link)

And made target type (URL) and the URL as shown below where P3_ID_VIDEO is a page item in the interactive report to hold the video id during runtime.

At the runtime the screen will be like this

I have to click on the (id) link to pass the video ID to the static region above and then the HTML source code will display the video from the BLOB column.

But there is a runtime error said it didn’t find the video

As shown above in the URL, it have a P3_ID_VIDEO = 21, BUT THE VIDEO WAS NOT FOUND, THE ERROR IS HTTP STATUS CODE 404

Also in the HTML source code I’m not sure if the

<source src="'||APEX.UTIL.GET_BLOB_FILE_SRC('P10_VIDEO_FILE',:P3_ID_VIDEO)|| type="video/mp4">

Will really get the video from the BLOB column because ('P10_VIDEO_FILE') is a field in another page (form page) used to enter the data into the table and the field ('P10_VIDEO_FILE') is a (file upload) type field used basically to upload the video into the table, so it should not have any value that the HTML source code can read and display.

I’m not sure where the error located exactly, but what I can say that the HTML source code didn’t find the video.

Also is the HTML source code inside the static region is the correct choice to display the BLOB column or the (dynamic PL SQL)?

Thanks

This post has been answered by InoL on Apr 19 2024
Jump to Answer
Comments
Post Details
Added on Apr 17 2024
18 comments
1,638 views