Search code examples
objective-ccocoadrag-and-dropfile-type

Cocoa: Drag and Drop any file type


I'm trying to create a drag and drop region that accepts any file type and will upload it to a server (using ASIHTTPRequest). I looked at the following example that Apple provides:

http://developer.apple.com/library/mac/#samplecode/CocoaDragAndDrop/Introduction/Intro.html

but it only covers dealing with the dragging and dropping of images. How can I set up my drag and drop operations to deal with any file type?

Thanks.


Solution

  • Judging by this post, you'd probably just have to have your view register for NSFilenamesPboardType instead of the imagePastBoardTypes to receive arbitrary file types.