Hi,
I was wondering what is the recommended way to use system variables in the data-file_picker_favorites
field from JS File Picker (GitHub - OSC/bc_js_filepicker: A file picker for Batch Connect applications)?
Using system variable for the default search directory:
data-default-directory: "$HOME"
works as expected.
However, I would like to expand the search directory to include multiple file-systems we support with per-user unique directories that are stored in system variables.
To do this, I use data-file_picker_favorites
, but since this field is in JSON format, system variables or Ruby syntax such as:
data-file_picker_favorites: '[{"title": "HOME", "href": "${HOME}"}, {"title": "WORK", "href": "/work/#{g}/#{User.new.name}"}]'
are not recognized.
Based on this, what would be your suggested way to use system variables in the data-file_picker_favorites
field?
Should we modify the files_api.js
script and recompile form.js
in order to support system variables for the File Picker?
I also understand that many of the File Picker features have been already incorporated in the newer OOD releases, so please let me know if there is some other solution we can consider.
We have Open OnDemand 3.1.10 on our cluster and we use the newest release of form.js
from JS File Picker.
Please let me know if you need any additional information.
Thank you,
Natasha