Hot answers tagged

3

OneDrive for Business and SharePoint Online Document Libraries support the same functionality in terms of co-authoring, versioning, and a few other features. There's no reason you couldn't work out of both, but the intention of each product is different. OneDrive for Business is designed for your 'personal' work documents, with occasional sharing and ...


2

As fox has answered using REST API, I would like to add via JSOM(way you have coded). Pointing out issues in your code. First you should load the onenote_file and run executequeryasync once to get your file object method then call moveTo method Second is SP.File.moveTo which is static method, you have to use File(as your object name is File), Below is ...


2

Try below endpoints and see which suits best for your use: 1) Using FileLeafRef property: /_api/web/lists/getByTitle('<library title>')/items?$select=FileLeafRef 2) Using File/Name property: /_api/web/lists/getbytitle('<library title>')/items?$select=File/Name&$expand=File 3) Using Folder/Files property: /_api/web/...


2

Finding differences between two csv files is not an OOB capability of SharePoint. SharePoint could host the files, and you could use JavaScript to read and compare the file contents.


1

Since you only need the urls of the files, and not the content, you can use the following code for your getFilesInFolder method and it should do the trick: public static void getFilesInFolder(List list) { CamlQuery query = CamlQuery.CreateAllItemsQuery(); query.ViewXml = "<View Scope=\"Recursive\"><Query><Where><Eq><...


1

There is no such fix number for files to upload inside a folder. For SharePoint Online: According to the Microsoft's official documentation: Service limits for all plans. Items in lists and libraries - A list can have up to 30 million items and a library can have up to 30 million files and folders. After 100,000 items are added to a list, library, or ...


1

ItemDeleted Event will trigger after the file has been deleted, if you want to get file which will be deleted, use ItemDeleting instead: SharePoint Remote Event Receiver – Item Deleting – Using Provider hosted App


1

Use ItemDeleting event instead of ItemDeleted if you want to get the file which is to be deleted. For ItemDeleted event List Item properties are not available. SharePointEventReceiver


1

If you want to trigger file delete event, we need use remote event receiver with CSOM to achieve it. If you only want to delete a file in SharePoint Online document library in client side, we can use PowerShell with CSOM or PnP PowerShell to achieve it. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web ...


1

If you do not want to bother with a sharing link. The easiest way shall be opening the file and copy the URL in the browser. The copy link action gives you sharing link is a by-design behavior.


1

Got your question. Getting the link is a bit tricky, especially if you have Modern settings enabled for your library. What you can do is just open the document in the browser and share the link directly with your colleague. Your colleague can then access this document . Make sure your colleague has read access on this file , so that he can open it too.


1

There are multiple ways you can get the link of document file from Library. If you are going to share just the URL of file (assuming access is already has been given) to your colleague then you can open the file and copy the URL from browser. That should work.


1

In the Library in question, go to "Library Settings" then "Advanced Settings" in there you should see the option to open in browser, i.e. Word Online, or open in client application, i.e. Word Client application.


1

We can use Open XML SDK to create Office documents, then using SharePoint client object model File.SaveBinaryDirect Method to upload the document to folder in SharePoint library. Example code: string siteUrl = "https://tenant.sharepoint.com/sites/lz"; var login = "lz@tenant.onmicrosoft.com"; var password = "xxx"; var documentLibrary = "DL0627"; var ...


1

You can upload documents to SharePoint libraries using the Object Model or SharePoint Webservices. Upload using Object Model: String fileToUpload = @"C:\YourFile.txt"; String sharePointSite = "http://yoursite.com/sites/Research/"; String documentLibraryName = "Shared Documents"; using (SPSite oSite = new SPSite(sharePointSite)) { using (SPWeb oWeb = ...


1

Based on the error message (and on command WordprocessingDocument) I assume You are trying to get content of Word documents. Problem is following - DOCX type of documents are OpenXML based so they can be opened as an archive file (for example, with 7zip) and will contain a lot of XML files and relations. This article by Stepan Yakovenko has good cover on ...


1

Generally a single http request if for accessing a single resource from the server. Given that I would do below Example: 20 farms Segregate your farms into 20 different CSV (which would have the links). Each CSV would only have links for 1 unique farm Have 20 unique application instances (your custom coded app which downloads the files) As others said, ...


1

Thanks Kristaps, I've managed to work around the issue another way For all checked out files, take ownership, check in, change permissions, while impersonating another user get a handle on the web again, then check out as that user.


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