OSC / bc_js_filepicker

A file picker for Batch Connect applications
MIT License
2 stars 6 forks source link

OOD 3.0 and remote_files_enabled #179

Closed m0zes closed 1 year ago

m0zes commented 1 year ago

Prerequisites:

We get the following trace, and a missing file picker button:

Uncaught TypeError: Cannot read properties of null (reading 'groups')
    at c (new:481:80509)
    at HTMLDocument.<anonymous> (new:481:88486)
    at R (jquery.js:3802:29)
    at Z (jquery.js:3870:12)
c

Expanding the function, here is the surrounding javascript:

                                    function c(t) {
                                        var e, n = [], r = a(t.querySelectorAll('li[title="Files"] a[title]').values());
                                        try {
                                            for (r.s(); !(e = r.n()).done; ) {
                                                var o = e.value
                                                  , i = o.title
                                                  , s = o.href
                                                  , c = new RegExp("dashboard/files/fs(?<path>.*)").exec(s);
                                                n.push({
                                                    title: i,
                                                    href: c.groups.path || "/"
                                                })
                                            }
                                        } catch (t) {
                                            r.e(t)
                                        } finally {
                                            r.f()
                                        }
                                        return n
                                    }

I'm obviously not expecting rclone remotes to work with any random ondemand interactive app, I would simply like to be able to use the file picker for files or folders local to the cluster, even when remote_files_enabled is true and there are rclone remotes defined.

johrstrom commented 1 year ago

Thanks for the ticket. This seems to be a bug. We'll get this patched shortly.

johrstrom commented 1 year ago

Hi, sorry for the delay this should be fixed now in version 3.0.1 - you can pull the form.js from here: https://github.com/OSC/bc_js_filepicker/releases/tag/v3.0.1