github →

New request

#2631: Bug: Attachment uploads use blob: URLs causing native image mode to fail

We'll provision a sandbox, run an agent against the issue, and open a draft PR. You can pull the branch and iterate from there.

Issue
bugneedinfoinvestigation

Bug Description

When uploading images via the attachment button in the WebUI, files are uploaded successfully but the model cannot see the images. The root cause is that the browser creates a blob: URL for in-memory files, but _build_native_multimodal_message() in api/streaming.py expects actual file paths to read and encode images as base64.

Steps to Reproduce

  1. Open Hermes WebUI
  2. Upload an image using the attachment button (not Ctrl+V paste)
  3. The UI shows "I've uploaded 1 file(s)"
  4. The model responds that it cannot see the image

Root Cause

In api/streaming.py around line 896, _build_native_multimodal_message() reads the file from disk:

path = Path(raw_path).expanduser().resolve()
data = base64.b64encode(path.read_bytes()).decode('ascii')

The raw_path from the attachment is a blob: URL which cannot be read as a local file path. The error is silently caught by except Exception: continue, resulting in image_count=0.

Expected Behavior

Either the backend should support blob URL proxying, or the frontend should provide the actual temporary file path alongside the blob URL.

Environment

  • Hermes WebUI latest
  • Windows 11
  • MiniMax M2.7 model
  • image_input_mode: native
Assessmentadvisory
bug●● medium90% confidence

Attachment blob URLs cannot be read as disk paths in the streaming handler; requires aligning frontend upload delivery with backend file reading.

Likely files
  • api/streaming.py
  • static/attachment-upload.js
  • api/upload.py
Create the request

This opens a fresh agent run and a draft PR for issue #2631.

Cancel