GET_FILE_ID Function

This function obtains the primary key of a file in the Oracle Application Express file repository.

Syntax

APEX_UTIL.GET_FILE_ID (
    p_fname    IN   VARCHAR2)
RETURN NUMBER;

Parameters

Table: GET_FILE_ID Parameters describes the parameters available in GET_FILE_ID function.

GET_FILE_ID Parameters

Parameter Description

p_fname

The NAME in APEX_APPLICATION_FILES of the file to be downloaded. APEX_APPLICATION_FILES is a view on all files uploaded to your workspace.


Example

DECLARE
        l_name VARCHAR2(255);
        l_file_id NUMBER;
BEGIN
        SELECT name INTO l_name FROM APEX_APPLICATION_FILES
        WHERE filename = 'F125.sql';
--
        l_file_id := APEX_UTIL.GET_FILE_ID(p_fname => l_name);
END;