fix: file inputs in the app webview open a native picker (speaker upload) - #7
Open
Ryu1845 wants to merge 1 commit into
Open
fix: file inputs in the app webview open a native picker (speaker upload)#7Ryu1845 wants to merge 1 commit into
Ryu1845 wants to merge 1 commit into
Conversation
…oads)
Ported from zonos1.cpp c4837ab — the same saucer gap exists here. saucer's
webviews implement no open-panel delegate on any platform (no
runOpenPanelWithParameters / run-file-chooser), so every HTML
<input type="file"> in the served web UI — the speaker audio and speaker
embedding uploads used for voice cloning — silently did nothing in zonos2-app:
clicking "choose file" showed no picker.
Inject a small script into every page load that intercepts clicks on file
inputs in the capture phase and routes them to a new exposed
pick_upload_files(multiple): native picker (saucer desktop, single or
multi-select), read the bytes, return [{name, b64}]. The shim decodes the
payload into File objects and sets them on the input via DataTransfer, then
dispatches a change event — the page's existing upload logic sees a normal
file selection. The web UI stays untouched (it must keep working in plain
browsers, where file inputs are fine).
Verified: ubuntu:24.04 container build green with the app download + segmented
smokes; the picker interaction itself needs a display, so verify by clicking
the speaker upload in the app.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.