Skip to main content
Share Your Experience: Take the 2024 Developer Survey
13 votes

How to get a Download link for a document in SharePoint library for anonymous users

You should be able to add the query string parameter `Web=0' For example: https://sitename-my.sharepoint.com/personal/vignesh/Documents/SomePresentation.pptx?Web=0
theChrisKent's user avatar
  • 6,011
13 votes
Accepted

How to get a Download link for a document in SharePoint library for anonymous users

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?...
Vignesh Subramanian's user avatar
11 votes
Accepted

Permission Level which doesn't allow renaming file in document library

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. ...
JoannaW_MSFT's user avatar
  • 6,621
10 votes
Accepted

How can I count Document library in Sites(SPWeb) Level?

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://...
Mohamed El-Qassas MVP's user avatar
10 votes
Accepted

Disable "new document" in document library for specific users

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 ...
Mohamed El-Qassas MVP's user avatar
9 votes
Accepted

Open Document Library documents in a new tab

Follow the mentioned steps below : Go to your document library page > edit page. Add script editor web part Add this code that tested and from my side (Code Ref : Opening a document in a SharePoint ...
Mohamed El-Qassas MVP's user avatar
8 votes
Accepted

Get Site Content Type ID by Content Type Name using REST API

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 ...
Atish Kumar Dipongkor's user avatar
8 votes

Difference between Wiki Library and Document Library

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. ...
Atish Kumar Dipongkor's user avatar
8 votes
Accepted

The file is locked for exclusive use by same person SharePoint Online

Common reason for this type of error is Either Document was open in the office Client program and some body working on it. Or client program was not close properly( terminate or crashed). Windows ...
Waqas Sarwar MVP's user avatar
  • 56.8k
8 votes

How to hide columns of subfolders inside a library?

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 ...
Christoffer's user avatar
  • 9,781
8 votes
Accepted

How do I create a upload button on SharePoint online

The upload form for a particular library can be accessed from http://site/_layouts/Upload.aspx?List={ID to the library} You can get the ID by e.g. going to the Document Library Settings, and the URL ...
moe's user avatar
  • 5,267
8 votes

Document library custom button in ribbon

"Modern" list and libraries do not support as many customization options as "classic" lists and libraries. In this article we'll provide details and examples of the supported options. The SharePoint ...
TARUN's user avatar
  • 2,856
7 votes

How to overwrite an existing document in SharePoint Library with a new document with different name?

Name the file you want to upload doc1.pdf. Go to "Upload" like you are adding a new file to the SharePoint folder. However, make sure the checkbox is selected "Add as a new version to existing files". ...
Sean's user avatar
  • 71
7 votes
Accepted

Allow commenting on a document but not editing

You could require content approval and turn on track changes. (In Word 2013, you can require a password to turn off track changes.) Then the person who has to approve the document can accept or reject ...
Erin L's user avatar
  • 4,028
7 votes
Accepted

Difference between Document Library and Form Library

Document Libraries in SharePoint consist of your main/core documents. For example a word document, excel, PowerPoint, Visio, pdf, csv, notepad etc. Form libraries consist of XML forms (InfoPath Forms)....
Aakash Maurya's user avatar
7 votes
Accepted

Giving description to Name column Document Library

Name column is from Document content type. It is not editable from browser or designer. See there is no link in the Name column. You will find the same thing in the SharePoint Designer also. ...
Atish Kumar Dipongkor's user avatar
7 votes
Accepted

SharePoint 2013: Document Library permissions behavior

When breaking inheritance and granting permission to items, you should always use bottom up approach, where all users when moving from smaller units (item) to bigger units(folder or library) should ...
Unnie's user avatar
  • 8,819
7 votes

What are the alternatives to InfoPath

Besides the above mentioned Infowise tools, another example of a paid tool would be Kintivo forms and Kwizcom forms It allows drag-drop of fields to be displayed in the form as well as branching and ...
Gautam Sheth's user avatar
  • 30.9k
7 votes
Accepted

Online - Share list data between two sub sites

If both the subsites are in the same site/site collection then, Just create a site column with lookup type and configure with the required list column. Go in the document library setting and select ...
Aakash Maurya's user avatar
7 votes
Accepted

Copy files from one site collection to another - CSOM

public void CopyDocuments(string srcUrl, string destUrl, string destLibrary) { ClientContext srcContext = new ClientContext(srcUrl); ClientContext destContext = new ...
Sivakumar Piratheeban's user avatar
7 votes
Accepted

Create text file and upload it to document library using REST API with JavaScript

Yes, its possible. Try and modify the below code. Fill the content with data from your lists: var content = "Hello, this text is inside the file created with REST API"; var digest = $("#...
Gautam Sheth's user avatar
  • 30.9k
7 votes

How to get the File Type of a File

You have to add one more attribute [File_x0020_Type] to your REST query select parameter : _spPageContextInfo.siteAbsoluteUrl + /_api/web/lists/getbytitle('<list title>')/items?$select=...
Gopal Zadafiya's user avatar
7 votes
Accepted

The remote server returned an error: (401) Unauthorized: While uploading file in document library using App Based Token Authentication

The issue is that the SaveBinaryDirect method does not support app-based authentication. You should use either SharePointOnlineCredentials for your ClientContext or upload files with ...
Dmitry Kozlov's user avatar
6 votes

SharePoint online c# csom download file

Try this IF Block below: Code: if (file != null) { FileInformation fileInfo = file.OpenBinaryDirect(context, fileRef.ToString()); var fileName = Path.Combine(filePath,(string)listItem.File....
Dikesh Gandhi's user avatar
6 votes

How can I count Document library in Sites(SPWeb) Level?

You can try this- as bellow using(SPSite oSite = new SPSite("https://server/site")) { using (SPWeb oWeb = oSite.OpenWeb()) { SPListCollection docLibraryColl = oWeb.GetListsOfType(...
Ram's user avatar
  • 2,444
6 votes
Accepted

Get all document from all folder and subfolder from document library sharepoint powershell

Dude, replace your script with this. $DocumentLibary = "TestDocuments" $LibLists = "test" $rootWeb = $clientContext.Web $LibLists = $rootWeb.lists.getByTitle($DocumentLibary) $clientContext.Load($...
Radityo Ardi's user avatar
  • 1,343
6 votes

Get the SPFolder programmatically and apply permission

Can you try out the below sample code that I took from here - I have a online enviornment, hence couldnt try, SPFolder folder = SharePointConfiguration.Site.GetFolder(path); //path of the folder ...
Swayam Siddha's user avatar
6 votes
Accepted

Type Icon Not Opening into the Document

You are creating an <a>-tag with href pointing to DispForm.aspx but not to the document itself. A better approach would be to utilize CSR via JSLink. Here is some CSR code that should get you ...
Daniel Stölzner's user avatar
6 votes
Accepted

Calculated Column Based on Version Not Updating

There are two issues. 1. Calculated columns are not synchronized with other columns' data, so when the version-column's value changes, the calculated field doesn't understand to re-calculate its ...
moe's user avatar
  • 5,267
6 votes

Number of documents inside a document library will be different when viewed from "Site Content" & "Open with Explorer"

This is because, site contents shows count of all the documents and folders, but when you open document library it shows only documents and folders which you have permission to access. Also there ...
P S's user avatar
  • 4,817

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