Skip to content

feat: add 'path' option to showOpenFileDialog#1453

Merged
KernelDeimos merged 2 commits intomainfrom
feat/path-for-open-file-dialog
Aug 20, 2025
Merged

feat: add 'path' option to showOpenFileDialog#1453
KernelDeimos merged 2 commits intomainfrom
feat/path-for-open-file-dialog

Conversation

@KernelDeimos
Copy link
Copy Markdown
Contributor

@KernelDeimos KernelDeimos commented Aug 19, 2025

This commit adds a 'path' option to showOpenFileDialog by supporting it in the relevant conditional block in IPC.js. A special path "%appdata%", which would otherwise produce an error in the file explorer (so no conflict is possible), will resolve to the appdata directory of the current app.

Example usage:

await puter.ui.showOpenFilePicker({
  accept: ['.proj'],
  path: '%appdata%/projects',
});

This commit adds a 'path' option to showOpenFileDialog by supporting it
in the relevant conditional block in IPC.js. A special path "%appdata%",
which would otherwise produce an error in the file explorer (so no
conflict is possible), will resolve to the appdata directory of the
current app.
This commit expands on the previously implemented '%appdata%' value for
the 'path' option for "Open File" dialogs and allows it to be a prefix
for arbitrary subdirectories under an app's AppData directory.
@KernelDeimos KernelDeimos merged commit 0180592 into main Aug 20, 2025
4 checks passed
@KernelDeimos KernelDeimos deleted the feat/path-for-open-file-dialog branch October 16, 2025 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant