Swiftcord
Swiftcord copied to clipboard
[Bug]: Drag and Drop doesn't work
Describe the Bug
When I drag a screenshot file into the Swiftcord window and let go, the image doesn't appear above the message bar. Uploading an image using the +
button works just fine, and dragging from Finder works too. This bug only happens when you drag a screenshot into the window.
Reproducing the Bug
- Use ⌘⇧3 to take a screenshot
- Drag the screenshot that appears in the bottom-right of the screen into Swiftcord
- No file appears in Swiftcord
Version
0.6.0
Category
Media (images, audio, video etc.)
Relevant Log Output
No response
Screenshots
https://github.com/SwiftcordApp/Swiftcord/assets/78750526/e0350069-bd0f-4f44-93d2-4be9ba72c826
Additional Info
No response
I've noticed this bug while using Swiftcord myself, and after some debugging it turns out that the issue is way more difficult to fix than expected. Turns out, images directly dragged from the small floating image on the bottom right don't have the normal document content type in the clipboard (that Swiftcord expects), but some weird ns-image
(or similar, I might've forgotten) format that seems more difficult to handle. I might rework some code to handle it, but it will be very difficult to support both drop item types.