What I am trying to do is to enable the dialog with the metadata information when I drag and drop a file in a document library. The same dialog that appears when you upload a file through the +New Document ribbon.
I already have a solution using JavaScript with SPServices, however I have everything hardcoded. I need a way to get the full URL in a relative way, without passing manually the name of the document library.
I know so far that _spPageContextInfo.siteServerRelativeUrl
gets you the relative URL of the site; also ctx.HttpRoot
retrieves the relative URL of the site. But I need this relative URL + the Document Library in which I am positioned.
Suppose that I have the following site:
http://mySite.com/Site1/DocLibrary/ThisIsASampleDoc.doc
I need to get the relative URL of: http://mySite.com/Site1/DocLibrary/