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!

Ajax error while Inserting File Browse Page item with Dynamic Actions

HawkerHunterApr 8 2021

Hi Friends,
I am facing a problem while trying to insert a File Browse Page Item using Dynamic Action - Execute PL/SQL code.
I am fetching the attached file attributes in the following way:
DECLARE
v_file_name VARCHAR2(240) ;
v_file_type VARCHAR2(240) ;
v_blob_content blob;
BEGIN
select filename, mime_type, blob_content into v_file_name, v_file_type, v_blob_content from apex_application_temp_files where application_id = 104 and name = :P10_ATTACHMENT;
--After fetching the above values, I want to insert in my application's table
INSERT INTO MY_ATTACHMENTS (FILE_NAME, FILE_TYPE, FILE_ATTACHMENT)
VALUES(v_file_name, v_file_type, v_blob_content);
--The Id of each record is assigned by trigger associated with the MY_ATTACHMENTS table
commit;
END;
For the File Browse page Item, I have set the Storage Type to "Table APEX_APPLICATION_TEMP_FILES"
image.pngHowever on executing I am getting the following error:
image.pngI am using Dynamic actions to attach files so that I can deactivate the "Attach" button once it is clicked otherwise if I use a submit button, multiple clicks were possible resulting in multiple uploads of the same file.
I shall be thankful if someone can help me to understand why I am getting this error.
Thanks and Regards
Hawker

Comments
Post Details
Added on Apr 8 2021
2 comments
540 views