58.49 GET_FILE Procedure
This procedure downloads files from the Oracle APEX file repository. If you invoke this procedure during page processing, ensure that no page branch is invoked under the same condition to avoid interference 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
Parameter | Description |
---|---|
p_file_id |
ID in
|
p_inline |
Valid values include YES and NO . YES to display inline in a browser. NO to download as attachment.
|
Example
The following example returns the file identified by the ID 8675309
. This is displayed inline in the browser.
BEGIN
APEX_UTIL.GET_FILE(
p_file_id => '8675309',
p_inline => 'YES');
END;
See Also:
GET_FILE_ID FunctionParent topic: APEX_UTIL