Context:
We have a custom Perspective component (built with the Component SDK) that needs to import a JSON config file from the local filesystem. It uses a standard hidden <input type="file">, triggered via fileInputRef.current.click() from a button handler. This works correctly in Perspective web sessions. In Perspective Workstation, it hangs the entire client.
Steps to reproduce:
- In a custom component, have a button call
fileInputRef.current.click()on a hidden<input type="file">. - Click that button while running the session in Perspective Workstation.
Observed: the screen darkens as if a file picker is about to open, then nothing happens. The window becomes completely unresponsive and has to be force-closed via Task Manager.
Diagnostics: we attached Chrome DevTools to the session (devTools=true launch argument) before reproducing. No error, warning, or any console output appears at all — the freeze happens before anything returns to JS, and the DevTools connection itself becomes unresponsive along with the rest of the window. This points to the renderer sending a request to the native host asking it to show an OS file-open dialog, and that request never being answered — i.e., Workstation's embedded browser shell doesn't appear to implement the native file-chooser callback that <input type="file"> (and, presumably, showOpenFilePicker()) depends on.
Workaround we're using: drag-and-drop (ondrop/event.dataTransfer.files) instead of the native picker, since that doesn't invoke any native dialog request at all — the OS hands file data to the page directly as part of the drag gesture.
Ask: Is this a known limitation of Workstation's embedded browser shell? Is there a supported way to invoke a native file-open dialog from a custom Perspective component that's known to actually work in Workstation, or is drag-and-drop / the built-in File Upload component the only sanctioned way to get a local file into a Workstation session?