[PR #963] [MERGED] Paste images from clipboard #1477

Closed
opened 2026-05-07 01:02:17 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/963
Author: @cmj2002
Created: 11/25/2023
Status: Merged
Merged: 3/7/2024
Merged by: @binwiederhier

Base: mainHead: main


📝 Commits (4)

  • a3312f6 Web: support pasting images from clipboard
  • 94781c8 Preview local file before send
  • 00fe639 Remove debug logging
  • 4b1468c Web: support pasting images to PublishDialog

📊 Changes

3 files changed (+60 additions, -13 deletions)

View changed files

📝 web/src/components/AttachmentIcon.jsx (+13 -11)
📝 web/src/components/Messaging.jsx (+32 -1)
📝 web/src/components/PublishDialog.jsx (+15 -1)

📄 Description

Implement #572.

Specific behaviors:

  • When the clipboard contains an image and is pasted on the MessageBar, open the PublishDialog and attach the image in the clipboard as a local file.
  • Clear the attached local file when the PublishDialog is closed.
  • Pasting inside the PublishDialog is ineffective.(edit: feature added)
  • When the clipboard contains an image and is pasted on the the message section of PublishDialog, the attached file will be changed to the pasted image (no matter whether it already has a file or not)

For convenience in previewing, a new feature has also been added: clicking on the icon of the attached local file will create a blob URL using URL.createObjectURL and open it in a new tab. This feature is effective for all attached local files.

This feature has already been tested in Chrome and Firefox (on Windows). Testing on Safari is still needed (I don't have Apple devices). You can test this feature at https://ntfy-clipboard.fly.dev.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/binwiederhier/ntfy/pull/963 **Author:** [@cmj2002](https://github.com/cmj2002) **Created:** 11/25/2023 **Status:** ✅ Merged **Merged:** 3/7/2024 **Merged by:** [@binwiederhier](https://github.com/binwiederhier) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (4) - [`a3312f6`](https://github.com/binwiederhier/ntfy/commit/a3312f69fbae40589f4671bfcfbd8bbb0accc3f2) Web: support pasting images from clipboard - [`94781c8`](https://github.com/binwiederhier/ntfy/commit/94781c89f39a1081e1872329283003d2137afaf2) Preview local file before send - [`00fe639`](https://github.com/binwiederhier/ntfy/commit/00fe639a950ae5dc317fa0c3499519fbccf45fc2) Remove debug logging - [`4b1468c`](https://github.com/binwiederhier/ntfy/commit/4b1468cfd8f49a0ccc34505fb5eff0a4dab59c1f) Web: support pasting images to PublishDialog ### 📊 Changes **3 files changed** (+60 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `web/src/components/AttachmentIcon.jsx` (+13 -11) 📝 `web/src/components/Messaging.jsx` (+32 -1) 📝 `web/src/components/PublishDialog.jsx` (+15 -1) </details> ### 📄 Description Implement #572. Specific behaviors: - When the clipboard contains an image and is pasted on the MessageBar, open the PublishDialog and attach the image in the clipboard as a local file. - Clear the attached local file when the PublishDialog is closed. - ~~Pasting inside the PublishDialog is ineffective.~~(edit: feature added) - When the clipboard contains an image and is pasted on the the message section of PublishDialog, the attached file will be changed to the pasted image (no matter whether it already has a file or not) For convenience in previewing, a new feature has also been added: clicking on the icon of the attached local file will create a blob URL using `URL.createObjectURL` and open it in a new tab. This feature is effective for all attached local files. This feature has already been tested in Chrome and Firefox (on Windows). **Testing on Safari is still needed** (I don't have Apple devices). You can test this feature at https://ntfy-clipboard.fly.dev. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 01:02:17 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1477
No description provided.