Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSURL returns file's id instead of file's path

I make a Drag&Drop feature. And my NSURL returns file's id instead of file's path.

Code:

fileURL = [NSURL URLFromPasteboard:[sender draggingPasteboard]];

What I receice:

file:///.file/id=6571367.686377

What I want to receive:

/Users/Desktop/someFile.png

How to fix this?

Thank you.

like image 311
Anton Chuiko Avatar asked Jul 09 '15 14:07

Anton Chuiko


1 Answers

it's an NSURL object, so it's just

filePath = [fileURL path];
like image 113
vadian Avatar answered Oct 17 '22 11:10

vadian