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!

File upload to local table

CJ BellNov 15 2019 — edited Dec 18 2019

Hi

can anyone point me to an online example / blog on how to use the file browser to upload files to my local table PROJECT_FILES

its on a master detail form and it needs to upload the file or files to my table with the ID and then the files to BLOB's

any help greatly appreciated !!

Thanks Chris

This post has been answered by fac586 on Nov 16 2019
Jump to Answer

Comments

Evandro Lima-Oracle

Hello, as you did not specify much, I leave here a link hint that can at least give you an idea of the options you have to upload files to the Database, hope it helps.

https://blogs.oracle.com/searchtech/loading-documents-and-other-file-data-into-the-oracle-database

Regards

CJ Bell

I am using the file browser item on a form as below

pastedImage_0.png

When the user selects the file I want the file to be uploaded to my table

The table i want the file to be uploaded to is not the table the form is based on I want to use the KEY field on the form to link to the other table

I also want to be able to load multiple files

I used to have a working version that used www_flow_files table then we copied the file from there - but this table doesn't exist now

I see that it uploads to APEX_APPLICATION_TEMP_FILES but when I check that table there is nothing there

hopefully thats a bit more detail

fac586

CJ Bell wrote:

I am using the file browser item on a form as below

pastedImage_0.png

When the user selects the file I want the file to be uploaded to my table

The table i want the file to be uploaded to is not the table the form is based on I want to use the KEY field on the form to link to the other table

I also want to be able to load multiple files

I used to have a working version that used www_flow_files table then we copied the file from there - but this table doesn't exist now

I see that it uploads to APEX_APPLICATION_TEMP_FILES but when I check that table there is nothing there

Note the "TEMP" in that table name. Files are only stored in APEX_APPLICATION_TEMP_FILES temporarily, with their lifetime being determined by setting the file browse item Purge File at property. The default option is End of Session, which stores the file until the end of the current APEX session. The other option is End of Request, which only holds the file for the duration of accept processing for the current page submission.

When are you checking for the files and what did the previously working version actually do? There is no reason why this shouldn't work if the file is copied to the target table at the appropriate time.

CJ Bell

I had something like this example previously

Use APEX to Create the File Browse Item - Create Upload Button

I set the purge file setting at session level then checked the table in SQLDeveloper after clicking apply changes and nothing was in there

fac586
Answer

CJ Bell wrote:

I had something like this example previously

Use APEX to Create the File Browse Item - Create Upload Button

Now very out of date (and not a source that I would recommend anyway).

I set the purge file setting at session level then checked the table in SQLDeveloper after clicking apply changes and nothing was in there

How were you connected to SQL Developer? APEX_APPLICATION_TEMP_FILES is a synonym for WWV_FLOW_TEMP_FILES, which is actually a session-dependent view. You would only see any data from within the same APEX session or when connected with elevated DBA or APEX_ADMINISTRATOR_ROLE privileges.

Marked as Answer by CJ Bell · Sep 27 2020
CJ Bell

I was in SQLDeveloper connected as The schema owner

I see what you mean , I will try and copy from that table to my local table using a process on the form thats in the session

1 - 6

Post Details

Added on Nov 15 2019
6 comments
334 views