27

When you create a document library, it ask you the name for the DL. Once you give it, it will create library with same name and URL. You can change the name of the library any time but cannot change the url. Here are the things i followed to create url accroding to my needs: Just go to a library trough 'Site Content' When inside the library choose on the ...


23

here is a better solution. Enjoy and let me know if you need more help :) ExecuteOrDelayUntilScriptLoaded(function() { g_uploadType = DragDropMode.NOTSUPPORTED; SPDragDropManager.DragDropMode = DragDropMode.NOTSUPPORTED; }, "DragDrop.js");


21

Since you are using SharePoint 2013 I would recommend you to consider the following approach. In SharePoint 2013 was introduced a so called Client Rendering Mode (CSR) which is intended for rendering of List Views and Forms using HTML and JavaScript and which is a default rendering mode. About View selector menu As part of CSR ClientPivotControl control (...


19

For the benefit of future generations, a file lock can be removed via Powershell on an on-premises installation of SharePoint 2010 or later. How can this happen? Files can get locked when a client application fails to update the server-side file token that indicates whether a file is currently being edited. (This type of lock is application-specific, and ...


14

You can't update field values in the same call that uploads the document, you have to do that in a separate call. The response from the call that uploads the document will be a SP.File object representing the file that was just created. This object will have a deffered property called ListItemAllFields, which you can use to get the URL needed to make a call ...


14

I'm quite sure this answer from support is still valid, even though it was written pre SP 2013: "I understand that you'd like to open HTML file in browser directly but not download it. The issue that you are seeing is by design. This is because of the way that permissive file handling works with SharePoint Online 2010 with Office 365. Unfortunately, ...


13

Actually, you don't need SharePoint Designer in order to achieve this. Instead you can use "Content and Structure" which is built into the SharePoint UI itself. "Content and Structure" is availabe on the Site Settings page after you have turned on the Site Collection scoped feature "SharePoint Server Publishing Infrastructure" (this is the name in ...


13

It depends on a few basic factors that need to be answered first: Will you use the same term store metadata anywhere else in the farm? You could have project numbers or contacts associated with other site collection in other applications. Maybe not at the moment, but in the future there may be a need. Consider this scenario as you make the decision. Would ...


12

How to create Folder (including nested) via CSOM in SharePoint /// <summary> /// Create Folder (including nested) client object /// </summary> /// <param name="web"></param> /// <param name="listTitle"></param> /// <param name="fullFolderPath"></param> /// <returns></returns> public static Folder ...


12

To get the direct download link, you have to click on the document, get the share link which will look like below url https://sitename-my.sharepoint.com/personal/xyz/_layouts/15/guestaccess.aspx?guestaccesstoken=xyz%3d&docid=xyz&rev=1 Now all you have to do is replace the guestacces.aspx with download.aspx, and the url should look like the one ...


11

This took forever to figure out, but of course it is simple once you got it. Instead of pasting a bunch of code, here is the context and then the raw HTTP POST request that I ended up with. The documentation is actually right here: http://msdn.microsoft.com/en-us/library/dd962796(v=office.12).aspx Syntax for the slug header is as following: /<...


11

Run this code. I have taken "filename" as a folder - you can replace it with any folder name that you want. ClientContext cxt = new ClientContext("http://win-8c97ll22qqc:100/sites/dev"); List list = cxt.Web.Lists.GetByTitle("Documents"); cxt.Load(list); cxt.Load(list.RootFolder); cxt.Load(list.RootFolder.Folders); cxt.Load(list.RootFolder.Files); cxt....


11

The following extension method demonstrates how determine whether file exist or not: using Microsoft.SharePoint.Client; namespace SharePoint.Client.Extensions { public static class WebExtensions { public static bool TryGetFileByServerRelativeUrl(this Web web, string serverRelativeUrl, out File file) { var ctx = web....


11

There is no single permission to control Rename option. But, if the user has Contribution permissions without Delete Item permission, he will get Access Denied when edit the name of the file. Contributor users are not able to rename items in SharePoint if the Delete permission level is removed from the Contributors group. It is by design and is mentioned ...


10

I'll weigh in on this as others have so just restating what some others have posted and why. For years I've been using the StyleLibrary. The reasons to me are obvious and simple: The StyleLibrary document library is there, out-of-the-box and in every site (except blank sites) It let's me create one per site collection so I can use different javascript/css/...


10

SharePoint has great built in methods to copy or move documents across sub-sites or lists within the same site collection. You can use SPFile.MoveTo or SPFile.CopyTo. You can even move whole folders and their contents with the SPFolder.MoveTo method. Very nice. Unfortunately, these do not work across site collections. where as use of RootFolder.Files.Add is ...


10

Finally i found solution, i got full file url through EncodedAbsUrl My Document id is 6 and got full filepath from its id var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('My Documents')/items?$select=EncodedAbsUrl&$filter=Id eq 6"; var requestHeaders = { "accept": "application/json;odata=verbose" } $....


10

No need for looping , just get the library at a specific site based on the base type equal to DocumentLibrary then get count of collection as the following : using(SPSite site = new SPSite("https://yoursiteURL")) { using (SPWeb web = site.OpenWeb()) { SPListCollection libcol = Web.GetListsOfType(SPBaseType.DocumentLibrary); libcol.Count; } ...


10

Yes, you can restrict a few users to upload or add a new document by managing unique permission for your library as the following: Go to your library > Library Setting. Click on Permissions for this document library From the above Ribbon, > Click on Stop the inheritance. Then click to Grant Permission to provide a unique permission for specific Provide ...


9

you need to use a 32-bit browser


9

you can use the below code to traverse a specified document library using client object model. using Microsoft.SharePoint.Client; class Program { static void Main() { using (ClientContext clientContext = new ClientContext("Your Site URL ")) { List docList = clientContext.Web.Lists.GetByTitle("...


9

I came across this today and found another workaround. When the web part is added to the page it creates a hidden view on the list it is bound to. You can get the hidden view and make the changes to it directly. This works for announcements, calendars and doc libraries from what I have tested so far. Example: private static void AddWebPart(Web web, ...


9

What does "moved the 5,000 list view limit" mean? The Software boundaries and limits for SharePoint 2013 shows that the limit for items in a list/library is 30M. (As far back as SP2007 it was 5M). So there is no concern for 36K items. However, retrieving more that 5K items in a single operation (a view) will cause performance degradation. That is why the ...


9

$web = Get-SPWeb -Identity http://sp2010 $list = $web.Lists["Documents"] $items = $list.Items foreach ($item in $items) { $file = $item.File $fileVersions = $file.Versions if ($fileVersions.Count -gt 0) { $fileVersions.Restore($fileVersions.Count - 1) } } UPDATE Please note that when any of previous ...


8

I was trying James' solution but was having problems building the correct URL of the document. To get the URL you can: Open Dev Tools (F12) Open the Network tab Click 'Start capturing' button Click the download a copy button for the document you want the link for The HTTP GET request URL will appear in the network tab.


8

As far as I understand your question, i think there is problem when your are uploading file through a mapped drive. If you copy & paste a file over windows explorer (WebDAV) to the Library the EventHandle (ItemAdded) will trigger as soon the File was created. But this doesn't mean the File is already filled with data. So one workaround should be to put ...


8

To add a treeview to a document library view, follow these steps: Browse to the view you want to add the treeview to. This must be a listview page (i.e. it won’t work on default .aspx or home.aspx). Edit the page in SharePoint Designer — then click Advanced Mode. Add a table to PlaceHolderMain with one row and two columns as shown below (NOTE: ” ” ...


8

You can get content type id from its name. Just you have to use $filter. "/_api/web/AvailableContentTypes?$select=Name,Id,StringId&$filter=Name eq 'Your CT Name'" Just make a GET request to the above end-point. PS: Id is a object. So better you can consider to $select StringId in your query.


8

Difference in General In wiki page library, people store wiki pages & web part pages (.aspx). It's an interconnected set of easily editable web pages, which can contain text, images and web parts. In document library, people store documents like .doc, .pdf, .xlsx and etc. You can use a document library to store, organize, sync, and share documents with ...


8

Go to advanced settings for the library and check "Per-Location View Settings". Here you should be able to set that the top in your hierarchy only uses a view that shows the column, and then set another view for all the others sub folders. Configure the availability of views for a location in the site hierarchy Per-location view settings don't work at ...


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