openclaw - 💡(How to fix) Fix [Feature]: Add image paste (Ctrl+V) and drag-and-drop upload support to Control UI chat [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59011Fetched 2026-04-08 02:29:57
View on GitHub
Comments
2
Participants
2
Timeline
3
Reactions
0
Timeline (top)
commented ×2labeled ×1

Currently the Control UI (webchat) does not support pasting images with Ctrl+V or dragging-and-dropping image files into the chat input. Users can only upload images through external means.

Add an invisible input[type=file] or listen to the paste and drop events on the chat input area to capture image files, then send them as attachments via the existing chat.send tool call.

Root Cause

Currently the Control UI (webchat) does not support pasting images with Ctrl+V or dragging-and-dropping image files into the chat input. Users can only upload images through external means.

Add an invisible input[type=file] or listen to the paste and drop events on the chat input area to capture image files, then send them as attachments via the existing chat.send tool call.

RAW_BUFFERClick to expand / collapse

Summary

Currently the Control UI (webchat) does not support pasting images with Ctrl+V or dragging-and-dropping image files into the chat input. Users can only upload images through external means.

Add an invisible input[type=file] or listen to the paste and drop events on the chat input area to capture image files, then send them as attachments via the existing chat.send tool call.

Problem to solve

Currently the Control UI (webchat) does not support pasting images with Ctrl+V or dragging-and-dropping image files into the chat input. Users can only upload images through external means.

Proposed solution

Add an invisible input[type=file] or listen to the paste and drop events on the chat input area to capture image files, then send them as attachments via the existing chat.send tool call.

Alternatives considered

  • File picker button (more intrusive than native paste/drop)

Impact

webchat User

Evidence/examples

No response

Additional information

No response

extent analysis

TL;DR

Implementing an event listener for paste and drop events on the chat input area to capture image files is likely the most straightforward fix.

Guidance

  • Add an event listener to the chat input area for the paste event to capture pasted images.
  • Add an event listener to the chat input area for the drop event to capture dragged-and-dropped image files.
  • Use the captured image files and send them as attachments via the existing chat.send tool call.
  • Consider adding an invisible input[type=file] as an alternative approach to handle file uploads.

Example

// Example of adding event listeners for paste and drop events
document.getElementById('chat-input').addEventListener('paste', handlePaste);
document.getElementById('chat-input').addEventListener('drop', handleDrop);

function handlePaste(event) {
  // Handle pasted image files
  const items = event.clipboardData.items;
  for (let i = 0; i < items.length; i++) {
    if (items[i].kind === 'file') {
      const file = items[i].getAsFile();
      // Send the file as an attachment via chat.send
      chat.send({ attachment: file });
    }
  }
}

function handleDrop(event) {
  // Handle dragged-and-dropped image files
  event.preventDefault();
  const files = event.dataTransfer.files;
  for (let i = 0; i < files.length; i++) {
    // Send the file as an attachment via chat.send
    chat.send({ attachment: files[i] });
  }
}

Notes

This solution assumes that the chat.send tool call can handle file attachments. If not, additional modifications may be necessary.

Recommendation

Apply workaround by implementing event listeners for paste and drop events, as it provides a non-intrusive way to support image uploads without requiring significant changes to the existing UI.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING