6 Replies Latest reply on Nov 17, 2019 11:22 AM by CJ Bell

    File upload to local table

    CJ Bell

      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

        • 1. Re: File upload to local table
          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

          • 2. Re: File upload to local table
            CJ Bell

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

             

            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

            • 3. Re: File upload to local table
              fac586

              CJ Bell wrote:

               

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

               

              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.

              • 4. Re: File upload to local table
                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

                • 5. Re: File upload to local table
                  fac586

                  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.

                  • 6. Re: File upload to local table
                    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