Make a document library that with links to filesystem
I want to make a "master" list or document library on our sharepoint site of links that point to various documents on across our different sites but also ones located in the filesystem eg. \someshare\somefile
I would like have to have the ability to sort these links in folders. I know I can use a list and set the group by columns, but that only gives me a folder structure that is 2 levels deep.
The "Link to Document" content type that can be added to a docoument library works fine for point to documents in sharepoint, but it requres that the url starts with http or https. Is there any way to add a link to a document library that 开发者_开发知识库will point to files located on a network share? Note: Due to some large file sizes uploading these files to sharepoint is not an option.
Thanks in advance.
For anyone who has this same problem I found an excellent and simple solution here: http://os.com/blog/linking-to-file-shares-from-sharepoint-document-libraries
Basically it involves modifying one of your layout files to accept file:// at the start of a link.
EDIT:
That link has dissapeared so here is the fix:
Find the file newlink.aspx on your Sharepoint web server(s). Located here by default: Drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\newlink.aspx
Whenever making any changes to layout files I recommend creating a backup of the just in case.
Add the following function to the script section:
function HasValidUrlPrefix_Override(url)
{
var urlLower=url.toLowerCase();
if (-1==urlLower.search(“^http://”) && -1==urlLower.search(“^https://”) && -1==urlLower.search(“^file://”))
return false;
return true;
}
Now you have you to change the ValidateInput() and TestDir() functions to call the function you just added. Change every instance of HasValidUrlPrefix(folderUrl) to HasValidUrlPrefix_Override(folderUrl). There should be 2 instances to change. On my original unedited file they were lines 43 and 62.
Save the changes and run iisreset.
精彩评论