flutter-plugins
flutter-plugins copied to clipboard
[desktop_drop] MacOS - Screenshot XFiles location
When trying to read the file from a MacOS screenshot from the desktop, it errors.
- Use the screenshot shortcut
- Drag the instant screenshot into the app
Example of file
/var/folders/p9/j8jkzc5j4cxfh3ckpvrg1f0h0000gn/T/TemporaryItems/NSIRD_screencaptureui_TPPuUM/Screenshot 2022-06-22 at 12.22.33.png
I found the error. After dropping the file into the flutter app, it sends 2 files. The first file is invalid.
The first invalid fileUrl read by draggingPasteboard.readObjects(forClasses: [NSURL.self], options: searchOptions)
https://github.com/MixinNetwork/flutter-plugins/blob/6b604ed71a53f1303fba4ba421ef13de1cb3f5bd/packages/desktop_drop/macos/Classes/DesktopDropPlugin.swift#L105-L110
But this was added in PR #73 which fixed #72.
I don't know how to remove this because I can not find any document for this, so let's keep this open till somebody could provider more help.