The JUCE system clipboard only allows you to add a text string, presumably it’s not a massive extension of this to allow files to be put in the clipboard, or is it? Anyone know?
Still looking for Mac solution
NSURL *object = [[NSURL alloc] initFileURLWithPath:@"/Users/username/Desktop/main.png"]; NSPasteboard *pb = [NSPasteboard generalPasteboard]; [pb clearContents]; NSArray *objectsToCopy = [[NSArray alloc] initWithObjects:object, nil]; BOOL pasted = [pb writeObjects:objectsToCopy]; if(pasted) // paste was successful NSLog(@"pasted"); [object release]; [objectsToCopy release]; [pb release]; ```
Nice… I just found that link to the reference: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/PasteboardGuide106/Articles/pbConcepts.html#//apple_ref/doc/uid/TP40008101-SW8
Would be cool to make that available to the SystemClipBoard…
I guess it’ll need solving for iOS, Android and Linux to be an official feature?