Skip edititem.aspx while uploading documents to document library in sharepoint
or
How to bypass Edit Properties Page while uploading documents in a document library
or
How to bypass Edit Properties Page while uploading documents in a document library
<script type="text/javascript">
_spBodyOnLoadFunctionNames.push("Redirect");
function Redirect()
{
var mode = getURLParam('Mode');
/* var sourceURL = getURLParam('Source');
var properSourceURL = replaceCharacters(sourceURL); */
if (mode == "Upload")
window.frameElement.commonModalDialogClose(1, 'saved');
/* window.location = properSourceURL;*/
}
function getURLParam(name)
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return results[1];
}
function replaceCharacters(str)
{
str = str.replace(/%20/g, " ");
str = str.replace(/%2F/g, "/");
str = str.replace(/%3A/g, ":");
str = str.replace(/%2E/g, ".");
return str;
}
</script>
Does this work in SharePoint 2013 on-prem?
ReplyDeleteNot checked...
ReplyDelete