Tag Info

Hot answers tagged


Use _spPageContextInfo.siteAbsoluteUrl for getting the site collection url. For more info, refer : http://blah.winsmarts.com/2013-2-_sppagecontextinfo_is_your_new_best_friend.aspx


You can use this URL : http://rootsite/_api/Web/webs?$expand=Lists/RootFolder&$select=Lists/RootFolder/ServerRelativeURL. This will return the subwebs along with the lists property expanded for each subweb. The Lists property will return all the lists and libraries associated with the subsite.


Try this one: /_api/Web/Lists?$select=Title,RootFolder/ServerRelativeUrl&$expand=RootFolder Then iterate all results and select list.RootFolder.ServerRelativeUrl.


Some how I figured out the way of using deferred and promises in correct manner. Following code runs perfectly as required. function upload() { // Define the folder path for this example. var serverRelativeUrlToFolder = 'SiteAssets'; // Get test values from the file input and text input page controls. var fileInput = jQuery('#getFile'); ...

Only top voted, non community-wiki answers of a minimum length are eligible