I have an html page with a certain input field and I want to add the following functionality.
The user should be able to drag and drop a resource onto the field. The
Do to security measures put in place by all modern browsers it is impossible to get the real full path of a file which has been drag and dropped into a browser.
All major browsers now replace the file path with "/fakepath/'FileName'" where 'FileName' is the name of the file you selected.
You can however still do drag and drop functionality and get JUST the file name of the file you dragged into the browser.
Here is a jsfiddle of a modification of the answer to the related question noted in the comments of the question
http://jsfiddle.net/c7cqN/