Skip to content

feat(files): support clipboard image uploads - #66785

Open
payal8797 wants to merge 8 commits into
nextcloud:masterfrom
payal8797:feature/clipboard-image-upload
Open

payal8797 wants to merge 8 commits into
nextcloud:masterfrom
payal8797:feature/clipboard-image-upload

Conversation

@payal8797

@payal8797 payal8797 commented Nov 18, 2026 •

Copy link
Copy Markdown

Summary

The goal is to allow users to paste copied images directly into the currently open folder in Nextcloud Files using Ctrl+V or Cmd+V, without having to save the image locally and upload it manually.
My approach was to make clipboard upload an extension of the existing upload functionality rather than introducing a separate upload mechanism.

Scope and assumptions

  • Support single and multiple images copied to the clipboard.
  • Preserve the original filename, image content, MIME type and modification timestamp provided by the browser.
  • Generate a valid fallback filename when the original filename is missing or invalid.
  • Handle duplicate filenames using Nextcloud's existing conflict resolution dialog.
  • Use existing upload permissions and storage quota restrictions.
  • Preserve normal paste behaviour when the clipboard does not contain images.
  • Display error notifications for clipboard uploads blocked.

TODO

  • Discuss the preferred naming strategy for browser-generated clipboard filenames.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

I used ChatGPT and Cursor for exploring implementation approaches, discussing edge cases, refining code, designing tests and reviewing changes.
I evaluated the suggestions against Nextcloud's existing architecture and conventions, reviewed the implementation, executed the automated tests and manually validated the feature in the development environment.

@payal8797
payal8797 requested review from a team and skjnldsv as code owners November 18, 2026 21:55
@payal8797
payal8797 requested review from icewind1991, kristian-zendato, salmart-dev and susnux and removed request for a team November 18, 2026 21:55
Assisted-by: ChatGPT:GPT-6
Signed-off-by: Payal Jain <payal8797@gmail.com>
Assisted-by: ChatGPT:GPT-6
Signed-off-by: Payal Jain <payal8797@gmail.com>
Assisted-by: ChatGPT:GPT-6
Signed-off-by: Payal Jain <payal8797@gmail.com>
Update unit and E2E tests to verify error notifications.

Signed-off-by: Payal Jain <payal8797@gmail.com>
Signed-off-by: Payal Jain <payal8797@gmail.com>
@payal8797
payal8797 force-pushed the feature/clipboard-image-upload branch from d7faf03 to 150180a Compare November 18, 2026 21:57

This branch has not been deployed

No deployments
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.

Allow pasting image from clipboard to upload

1 participant