I want to share document in page which does not have document library web part (hence I can't get renderCtx).
I need to use this function:
DisplaySharingDialog('http://spdev/sites/default','{A967D704-F12E-4A37-A37B-69AF80F64F7E}','27');
All what I have is files (list items) url eg. /sites/default/subsite/Shared Documents/MTT (Training) Application and User Location Diagram.vsdx
Can I get list id and item id from document path ?
Starting my jurney with this:
$.ajax({
type: "GET",
url: "http://spdev/sites/default/_api/web/getfilebyserverrelativeurl('/sites/default/subsite/Shared Documents/MTT (Training) Application and User Location Diagram.vsdx')",
headers: { "accept": "application/json; odata=verbose" },
success: function (response) {
console.log('Response',response);
if (response.d.Exists) {
var responseIds = response.d.ContentTag.split(',');
EnsureScriptFunc('sharing.js', 'DisplaySharingDialog', function () {
...
});
}
else {
alert('Error occured...');
}
}
});
But this call returns wrong data...