Hot answers tagged

10 votes

get the attachement files from REST API

Not enough Reputation to add a comment, but DacrioS has cracked it. I have an on-premises install of Sharepoint 2013 and could not get attachments to show up when using _api/web REST interface. ...
skrile's user avatar
  • 303
9 votes
Accepted

sharepoint rest api, serverRelativeUrl, extended properties on all files

You probably want this query: /_api/web/getfolderbyserverrelativeurl('<url>')/Files?$expand=ListItemAllFields It will return files properties along with associated list item properties.
Vadim Gremyachev's user avatar
8 votes
Accepted

How to correctly include file in Powershell?

You can use below snippet to include the Powershell Files into your script. 1) If your required files are in the folder, where your main script lies. Then in main script you can write down below ...
Asad Refai's user avatar
  • 5,983
7 votes

What is the file size upload limit for SharePoint online?

What is the file size upload limit for SharePoint online? the File upload limit for SharePoint Online in Office 365 Business Essentials and Office 365 Business Premium is 10 GB per file and file ...
Mohamed El-Qassas MVP's user avatar
6 votes
Accepted

Include JS Files in JS Link File

Make JSlink load your file You can put multiple files in the JSlink where you now use: ~sitecollection\....\yourCSRfile.js They have to be separated by a ; (semi-colon) They do not have to be CSR ...
Danny '365CSI' Engelman's user avatar
6 votes
Accepted

SP Online - SharePoint Hosted Add'in - type(extension) of pages

.html and .htm are absolutely identical. In terms of apps there is no difference if you are creating .aspx or .html. But you need to consider your requirements carefully. For example, if you ...
Sergei Sergeev's user avatar
5 votes

With REST recursively retrieve file and folder directory structure

You are probably looking for FileRef property instead of (or in addition to) FileLeafRef property. FileRef property returns server relative file/folder url The following query demonstrates how ...
Vadim Gremyachev's user avatar
5 votes
Accepted

Connect Windows File Share with SharePoint Foundation 2013

If you are asking whether you can leave files in a file share and access them through SharePoint with the out-of-the-box features then the answer is no. There are however, 3rd party solutions out ...
Erik Perez's user avatar
  • 1,685
4 votes

How to get a file using SharePoint Client Object Model with only an absolute url at hand?

Try something like this Uri filename = new Uri(@"file full url"); var f = this.Web.GetFileByServerRelativeUrl(filename.AbsolutePath); var stream = f.OpenBinaryStream(); this.Context.Load(f); this....
yunui's user avatar
  • 81
4 votes

get the attachement files from REST API

If you get a message like: The 'Attachments' column doesn't exists. Try adding 'Attachments' to the select, like: _api/lists/getByTitle('MyList')/items?$select=Attachment,AttachmentFiles,Title&$...
Severino Pérez Santiago's user avatar
3 votes
Accepted

REST call to move a file/folder to another location

You can use the next code: $(function() { SP.SOD.executeFunc('sp.js', 'SP.ClientContext', CopyFile); }); function CopyFile(){ var oUrl = _spPageContextInfo....
Marco's user avatar
  • 1,044
3 votes

How to use Microsoft.SharePoint.Client.File.SaveBinary method?

Save document library file to local file system using CSOM. using (var clientContext = new ClientContext(url)) { var list = clientContext.Web.Lists.GetByTitle(listTitle); var listItem = ...
Divya Sharma's user avatar
  • 1,463
3 votes

File wont checkIn via rest

Turns out, the comment is very important. My previous comment was "Checked in during Migration." I believe the extra "." was causing the issue. When I changed the checkin comment to "Migration", it ...
prog_24's user avatar
  • 211
3 votes

Get file data from REST

You can combine these two by $expanding ListItemAllFields column of the File. ListItemAllFields is __deferred property of File. I believe you know that we need to $expand all Lookup columns and ...
Atish Kumar Dipongkor's user avatar
3 votes
Accepted

How to view files in a library in SharePoint Designer

Open site in designer->All Files-> select Document Library please check the below image
TARUN's user avatar
  • 2,836
3 votes
Accepted

Download sharepoint document with REST as binary file not working for me

Ok i found the problem... First: The API calls were both correct. The fact is that I am developing with Nodejs and I realized that the request module automatically converts the result to utf8 as the ...
Mikel's user avatar
  • 343
3 votes

Download file from SharePoint Online with PowerShell

You can use this cmdlet : Get-PnPFile Get-PnPFile -Url fileUrl -AsFile
a1mery's user avatar
  • 344
2 votes

Save Excel file locally using client object model and C#

Based on my research and past experience this could be an approach to download files from a SharePoint Document Library. First you get connected to the SharePoint site, and retrieve using list....
Asad Refai's user avatar
  • 5,983
2 votes

Extract text/string from file name

It depends a bit on what your actual requirements are. 2010 workflows do have the capability of extracting substrings, but you have to know the indexes ahead of time. There is no functionality ...
Dylan Cristy's user avatar
  • 12.6k
2 votes
Accepted

Retrieving SharePoint Item ID - Powershell

If you want to get the ID of the item for the corresponding file, you may simply try: $file.Item.ID
Evariste's user avatar
  • 9,751
2 votes
Accepted

SPCheckinType.OverwriteCheckIn in Poweshell

To reference static types and enums use a [] notation: [Microsoft.SharePoint.SPCheckinType]::OverwriteCheckIn
Aziz Kabyshev's user avatar
2 votes
Accepted

Take InfoPath form data in XML and upload it into other Document Library

Hey for your tried code 2, Just replace this FileInformation fileInfo = Microsoft.SharePoint.Client.File.OpenBinaryDirect(context, file.ServerRelativeUrl); With this var clientResultStream = file....
Aakash Maurya's user avatar
2 votes
Accepted

Selecting only PowerPoint files in a CAML query

Try: <Where><Eq><FieldRef Name='FileExtension'><Value Type='text'>pptx</Value></FieldRef></Eq></Where>
Juan Pablo Pussacq Laborde's user avatar
2 votes

Selecting only PowerPoint files in a CAML query

You may use DocIcon to determine the type of file in your CAML Query <Eq><FieldRef Name="DocIcon"/><Value Type="Computed">pptx</Value></Eq> Source: Filter file types ...
Nadeem Yousuf-AIS's user avatar
2 votes

Retrieving the file size / checksum

Make a GET request using this It will show response in JSON format. You can use the below rest Api to make a request. /_api/web/getfilebyserverrelativeurl('/Library Name/DocumentName.doc')/Length?@...
sam's user avatar
  • 182
2 votes
Accepted

Do File System Operation via app pool account

You can use RunWithElevatedPrivileges to perform System.IO operations. Try below code: SPSecurity.RunWithElevatedPrivileges(delegate() { String folderpath = "" + @"c:\myfolder"; if (!System....
Gautam Sheth's user avatar
  • 30.7k
2 votes

What is the file size upload limit for SharePoint online?

FEATURE DESCRIPTION File upload limit 10 GB - 1 byte (10,737,418,239 bytes) per file. In classic mode, upload methods other than drag and drop have a 2 GB limit. File attachment size limit ...
Dock Intranet Portal's user avatar
2 votes

What is the file size upload limit for SharePoint online?

In the latest update (currently August 2017), file size limit has been increased to 15GB instead of 10GB. File attachment size limit keeps beeing 250 MB. SharePoint Online limits in February 3rd of ...
Sergio's user avatar
  • 608

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