Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

get site collection url, site url and list url from a full uri?

$
0
0

If I have incoming: only URI's of the format http://a.b.c/d/e/f/g/h/i/j/k/l/m/n/o/p.docx

(And these are coming from multiple farms and multiple site collections) (and i have a web api on some remote server) (and have all the authentication details)

And I want to query just the single the item via csom : check one column and if value="yes" then download the doc:

a. how do i get the absolute site url out of it for " clientcontext ctx = new clientcontext(THISURL) "

b. how do i then get the list uri out of it to push a caml query to to then retrieve it

I could :

a. strip off the filename, that is the easy part :)

b.  I could paste "/_api/contextinfo" behind it and POST it first as a httprequest. Then first get the site and web url and later on find a way to find the list url (which is probably the first item behind the fullWebUrl), but it seems weird to mix this in the mix

Basically im looking for something that tells me what is what in http://a.b.c/d/e/f/g/h/i/j/k/l/m/n/o/p.docx






Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>