Wanted: Straight forward way to copy binary file from public folder to folder "databases"

Dear Capacitor experts,
I managed to copy a large binary file from public folder to folder “databases” by this code:

        window.addEventListener('touchstart', event => {
            console.log('click fired');
            if (event.target.id == 'btn-pick-db-file') {
                exportsFilepicker.pickFiles({
                    types: ['application/octet-stream'],
                    multiple: false
                }).then(result => {
                    console.log(result.files[0]);

                    // This makes the app crash when file is large:
                    // Capacitor.Plugins.Filesystem.readFile({ path: result.files[0].path })
                    //     .then(file => {
                    //         console.log(file.data);
                    // fetch('data:application/octet-stream;base64,' + file.data)

                    // This is working:
                    fetch(Capacitor.convertFileSrc(result.files[0].path))
                        .then(res => res.blob())
                        .then(blob => {
                            console.log(blob);
                            window.capacitor_blob_writer({
                                // path: 'file:///data/user/0/com.substanzen.app/databases/SubstancesSQLite.db',
                                path: '../databases/SubstancesSQLite.db',
                                blob: blob,
                                recursive: true,
                                directory: 'DATA',
                                fast_mode: false
                            }).then(result => {
                                console.log('Datenbankdatei wurde erfolgreich eingelesen');
                                displaySubstances();
                            });
                        });
                });
            }
            if (event.target.id == 'btn-download-db-file') {
                readDatabaseFile();
            }
        });

but in my opinion this is anything but straight forward.
Is there a way to get this job done more simple?
Best regards, Ulrich

In the meantime I came across an alternative which is more straight forward: Use an input of type file and javascript’s event listener:

        myFileInput.addEventListener('change', event => {
                const file = event.target.files[0];
                const reader = new FileReader();
                reader.onload = function (e) {
                    const blob = new Blob([new Uint8Array(e.target.result)], { type: file.type });
                    console.log(blob);
                    window.capacitor_blob_writer({
                        path: '../databases/SubstancesSQLite.db',
                        blob: blob,
                        recursive: true,
                        directory: 'DATA',
                        fast_mode: false
                    }).then(result => {
                        console.log('File was read successfully');
                        // Further processing:
                        displaySubstances();
                    });
                };
                reader.readAsArrayBuffer(file);
        }),