Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Querying the NAME column in APEX_APPLICATION_TEMP_FILES

WaggersApr 10 2024 — edited Apr 10 2024

I'm using APEX 19.2 and adding a File Browse page item.

I've set the Storage Type to use the APEX_APPLICATION_TEMP_FILES table, and the related help text says this:

Table APEX_APPLICATION_TEMP_FILES

Stores the uploaded file(s) in a temporary location that you can access with the view APEX_APPLICATION_TEMP_FILES. Application Express will automatically delete the file(s) at the end of the session or at the end of the upload request, depending on what you choose for Purge File At.

To access a file if Allow Multiple Files is set to No:

select * from apex_application_temp_file
where name = :page item name;

However when I query apex_application_temp_file, the name column does not contain the page item name (in my case, ‘P15_IMPORT_FILE’). Instead it contains the ID of the record concatenated with the file name of the uploaded file - like ‘747786471621242105/my_test_file.json’.

Since I won't necessarily know the auto-generated ID or the file name the user picks at runtime, I can't use the suggested query since the name column is useless. (Both the ID and file name have their own columns in that view already).

My question is really, is this a known bug and is it being (or has been) fixed? Or am I missing something?

In the meantime I'll have to use the “created on” column to find the latest uploaded file, but I sense that's less efficient than a simple query on the item name - so there's a workaround but it's not ideal.

Comments
Post Details
Added on Apr 10 2024
1 comment
1,019 views