Home > APEX_UTIL > GET_FILE Procedure
Previous |
Next |
This procedure downloads files from the Oracle Application Express file repository. Please note if you are invoking this procedure during page processing, you must ensure that no page branch will be invoked under the same condition, as it will interfere with the file retrieval. This means that branches with any of the following conditions should not be set to fire:
Branches with a 'When Button Pressed' attribute equal to the button that invokes the procedure.
Branches with conditional logic defined that would succeed during page processing when the procedure is being invoked.
As unconditional.
Syntax
APEX_UTIL.GET_FILE ( p_file_id IN VARCHAR2, p_inline IN VARCHAR2 DEFAULT 'NO');
Parameters
Table: GET_FILE Parameters describes the parameters available in GET_FILE
procedure.
GET_FILE Parameters
Parameter | Description |
---|---|
|
ID in DECLARE l_file_id NUMBER; BEGIN SELECT id INTO l_file_id FROM APEX_APPLICATION_FILES WHERE filename = 'myxml'; -- APEX_UTIL.GET_FILE( p_file_id => l_file_id, p_inline => 'YES'); END; |
|
Valid values include |
Example
The following example shows how to use the GET_FILE
function to return the file identified by the ID 8675309. This will be displayed inline in the browser.
BEGIN APEX_UTIL.GET_FILE( p_file_id => '8675309', p_inline => 'YES'); END;