Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linking to a File in Oracle ApEx

I'm trying to create a report in Oracle ApEx that displays a list of files, and allows you to download them.

The files are being created by an external application and I have full control over where they are placed. Just now I am creating them in a subfolder of the ApEx images directory (C:\oracle\product\11.2.0\dbhome_1\apex\images). However, if I try to link to here, I just get a blank page - I've tried the #WORKSPACE_IMAGES# and #IMAGE_PREFIX# values as the link URL but it doesn't work.

There doesn't seem to be any way to automatically add a file to ApEx's flows_files.wwv_flow_file_objects$ table other than having an ApEx page do it (or upload it as a static file using the ApEx workspace). One thing I think might be possible is to manually insert a record into the table, but with the various IDs it requires this could be a minefield.

Has anyone else came across this problem? Linking to a file on any other webserver would be elementary, especially if it is placed under the document root.

like image 984
Datajam Avatar asked Jul 15 '11 09:07

Datajam


1 Answers

Just to provide an answer to this in case anyone stumbles upon this question - I managed to resolve it by storing the files in the database as BLOB values. You can then set up ApEx to serve up these files by following the instructions here: http://download.oracle.com/docs/cd/E14373_01/appdev.32/e13363/up_dn_files.htm#CIHHEHCJ

like image 172
Datajam Avatar answered Oct 11 '22 06:10

Datajam