OSC / bc_js_filepicker

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

wrong fetch path in 2.0 #150

Closed johrstrom closed 3 years ago

johrstrom commented 3 years ago

Hello,

I've been using the master branch of the js_filepicker with the master branch of ondemand. But I'm still getting a parsing error very similar to this one.

Though, the nginx log shows a different message I think:

ERROR "No such file or directory @ rb_file_s_stat - /https:/ao-ood2/pun/sys/dashboard/files/fs/home/toto"
INFO "method=GET path=/pun/sys/dashboard/files/api/v1/fs/https:/ao-ood2/pun/sys/dashboard/files/fs/home/toto format=html controller=FilesController action=fs status=200 duration=49.26 view=28.12"

I've been trying to force the path replacing the 'fetch' like this:

  return fetch('/pun/sys/files/api/v1/fs/home/toto', {
    credentials: 'same-origin',
    redirect: 'follow',
  });

Although I no longer see any error in the nginx log, I'm still getting the parsing error anyway.

INFO "method=GET path=/pun/sys/dashboard/files/api/v1/fs/home/toto format=html controller=FilesController action=fs status=200 duration=39.15 view=19.50"

_Originally posted by @GloktarFR in https://github.com/OSC/bc_js_filepicker/issues/144#issuecomment-864112053_