Closed jadchaar closed 4 years ago
Note that images copied from your computer (e.g. from the Desktop folder or "Copy Media" in Telegram which copies a cached version of the media under the hood) falls into NSPasteboard.PasteboardType.fileURL
as well.
I'd go with storing file paths and showing them in HistoryItem
's for anything but images (so it would look like /Users/user/some_file.pdf
with maybe an icon to let the user know it's a file, not a string). For images, we can display the actual image itself (NSImage
can create images from file URLs).
Note 2: we can actually put file URLs into clipboard and mark it as .fileURL
and mac OS would do everything for us in other apps (paste the actual file instead of the path). So the only thing we're left with is displaying images/paths to files and support .fileURL
. I'd provide a pull request for it as well.
Implemented via 6a2b6aa.
The solution will work like this:
The recent feature addition for images in https://github.com/p0deje/Maccy/issues/44 is great, but I would also like to request support for accessing copied files like PDFs and such from the clipboard history.