Reports and data entry constitute the bulk of what most of these tutorials cover, and what
many businesses need. However, there is the need to be able to upload documents for anyone with
permissions to share, after all, why re-create the same document 100 times if you can just
upload it, and others can download it. This tutorial focuses on integrating document upload and
download into an APEX application. We recommend you review our Oracle APEX Tutorial Preparation and OEHR Sample Data Install article before beginning.
Part 1 – Creating and Testing the Base Application and Report.
High Level Steps
1) Create base Application (0:30)
2) Create Upload section and test (1:59)
3) Create Report with Links (4:49)
4) Setting up for Additional Information (7:05)
Times in parenthesis are approximate start times for that step
Notes and Information
Some of the screen shots in the video may vary from your own screen shots as you proceed
through this tutorial. This is due to the fact that you may not be on an installation of APEX
that was made specifically for training. You may see other files in your report, as your DBA
may have other workspaces and items in another part of the installation.
APEX Application calls
In this tutorial we again call a built in feature of APEX. In our APEX Tutorial 5 (Working
with Check Boxes) We used the APEX_APPLICATION_G.x feature to dynamically create items. In this
tutorial, we are using the APEX_APPLICATION_FILES package which allows you to access any file
that has been uploaded to the APEX system. It is actually a view on an internal table that is
accessible to all workspaces through the view.
Code and Pasted Text
Upload Region Item Name
SQL for Uploaded Files Report
SELECT id,name FROM APEX_APPLICATION_FILES
Table Creation Command for File Subject table
CREATE TABLE oehr_file_subject (name VARCHAR2(4000) PRIMARY KEY, subject VARCHAR2(4000));
Insert File Description Process
INSERT INTO oehr_file_subject(name,subject) VALUES (:P1_FILE_NAME, :P1_FILE_SUBJECT);