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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

APEX 20.2 Native Dropzone Multiple File Upload.

RunrigNov 6 2020

Does anyone have an example of the multiple file upload functionality in Apex 20.2 with the native DropZone file upload region ?

This post has been answered by Hilary Farrell-Oracle on Nov 6 2020
Jump to Answer

Comments

Answer

Hi Runrig,
If you want to upload multiple files using the native 'Inline Dropzone' or 'Block Dropzone' Display As option of the native File Browse item, then just ensure the 'Allow Multiple Files' attribute is switched to 'On'. As the associated item-level help explains, Multiple file names will be stored as a colon delimited list in the page item. So just ensure your upload process logic is handling the the processing of the colon delimited list. Take a look at the APEX_STRING.SPLIT function to process the page item value, and then loop through the result of that function to save each file name uploaded. Try installing the Sample File Upload and Download app via App Gallery. Edit the Project page, 13, and update the page item P13_FILE File Browse item to have the following settings:
Display As = Inline Dropzone
Allow Multiple Files = switched on
Then update the 'Upload File' page process to handle the multiple values now e.g.

declare
    l_files  apex_t_varchar2;
begin
    l_files := apex_string.split(:P13_FILE,':');
    for i in 1..l_files.count loop
        for c1 in (select *
                           from apex_application_temp_files
                         where name = l_files(i))
        loop
        ...
        -- Add your insert statement here
        ....
        end loop;
    end loop;
end;

If you then try uploading multiple files, you can inspect the 'Project Attachments' show/hide region at the bottom of the Project page, to see the list of uploaded files.
I hope this helps.
Regards,
Hilary

Marked as Answer by Runrig · Nov 6 2020
Runrig

Thanks. This is perfect.

1 - 2

Post Details

Added on Nov 6 2020
2 comments
4,179 views