Web interface: Attaching files is broken in insecure contexts #8131

Closed
opened 2026-02-16 18:09:14 -05:00 by yindo · 1 comment
Owner

Originally created by @bjesus on GitHub (Jan 31, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Description

I'm using Opencode web installed on a server of mine inside the home network. When trying to attach a file, I get an error in the console for crypto.randomUUID being undefined, and the file isn't uploaded. crypto.randomUUID is indeed undefined, because running not on "localhost" and over HTTP is considered insecure. However, the rest of opencode works just fine, and this is only about creating a unique ID for the attachment.

Plugins

No response

OpenCode version

No response

Steps to reproduce

  1. Run opencode web
  2. Connect from another computer on the same network
  3. Try to attach a file

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @bjesus on GitHub (Jan 31, 2026). Originally assigned to: @adamdotdevin on GitHub. ### Description I'm using Opencode web installed on a server of mine inside the home network. When trying to attach a file, I get an error in the console for crypto.randomUUID being undefined, and the file isn't uploaded. `crypto.randomUUID` is indeed undefined, because running not on "localhost" and over HTTP is considered insecure. However, the rest of opencode works just fine, and this is only about creating a unique ID for the attachment. ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce 1. Run opencode web 2. Connect from another computer on the same network 3. Try to attach a file ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bugweb labels 2026-02-16 18:09:14 -05:00
yindo closed this issue 2026-02-16 18:09:14 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 31, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #5844: Web terminal fails when accessing via network IP instead of localhost (related insecure context issue)
  • #8486: File selection in the WebUI does not work (file handling in web interface)
  • #8807: Unhandled ENOENT error when submitting a message with a deleted file attachment (file attachment error handling)
  • #10794: Drag image here — Not available (file/image attachment in cloud-based server)

These issues suggest a broader problem with how the web interface handles file operations and insecure contexts. Feel free to ignore if your specific case requires a different approach.

@github-actions[bot] commented on GitHub (Jan 31, 2026): This issue might be a duplicate of existing issues. Please check: - #5844: Web terminal fails when accessing via network IP instead of localhost (related insecure context issue) - #8486: File selection in the WebUI does not work (file handling in web interface) - #8807: Unhandled ENOENT error when submitting a message with a deleted file attachment (file attachment error handling) - #10794: Drag image here — Not available (file/image attachment in cloud-based server) These issues suggest a broader problem with how the web interface handles file operations and insecure contexts. Feel free to ignore if your specific case requires a different approach.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8131