16
votes
Accepted
Manage File permissions using REST API
In order to manage unique permissions for a Securable Object like List or File (via associated List Item) or Folder (via associated List Item) there is a common approach that you could consider:
...
11
votes
Cannot invoke HTTP DAV request. There is a pending query during OpenBinaryDirect
The error:
Additional information: Cannot invoke HTTP DAV request. There is a
pending query.
is encountered when ClientRuntimeContext.HasPendingRequest property returns true.
In case of File....
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. ...
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.
8
votes
Accepted
get the attachement files from REST API
You need to $select and $expand the AttachmentFiles property for your list items if you want to select many items from the list.
_api/lists/getByTitle('MyList')/items?$select=AttachmentFiles,Title&...
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 ...
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 ...
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 ...
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 ...
5
votes
Accepted
Best way to migrate Document Library files to file system
Their are couple of ways to download the documents from SharePoint Document library.
Using the Explorer view, you can drag and drop the documents to local directory.
UNC mapping to the SharePoint ...
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 ...
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 ...
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....
4
votes
Accepted
How to I programmatically move documents from file system to SharePoint Library
expanding on Annchal method you could use explorer view to do this. Time is money, your going to manually create the document library and then write and test the code which could take some time to get ...
4
votes
get the attachement files from REST API
You can get attachments using
var url = url + "/_api/web/lists/getbytitle('ListTitle')/items(1)/AttachmentFiles";
$.ajax({
url: url,
accepts: {
json: "application/json;odata=verbose"
...
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&$...
4
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 ...
3
votes
get the attachement files from REST API
I don't have enough reputation to comment so I can only "answer" :-( The answer from john-m sounds great but it does not seem to work?
$select=AttachmentFiles,Title does return the expected result, ...
3
votes
Clipboard upload SharePoint 2010 multiple files
Sounds like the "Open in Explorer" feature is your best bet. Go to the target library, click the "Library" tab, and click "Open in Explorer" (only works in 32 bit IE). This will make the library look ...
3
votes
How to I programmatically move documents from file system to SharePoint Library
You have multiple ways of uploading a document, depending on where you code is running.
Server object model:
var context = SPContext.Current;
// Get the web reference
var web = context.Web;
/...
3
votes
Deleted items are still showing on Search result after Full Crawls or incremental Crawls
Search uses Delete policy for access denied or file not found
When the crawler encounters an access denied or a file not found error, the item is deleted from the index if the error was encountered ...
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 = ...
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....
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 ...
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
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 ...
3
votes
Accepted
How to securely delete files from Sharepoint (so they are unrecoverable)
You can delete them from the secondary recycle bin which will remove their entry completely from the content database.
3
votes
What Real-time Collaboration Advantages Are There By Using a SharePoint Document Library Versus OneDrive?
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 ...
3
votes
Accepted
Is there a way to get the json content of files fetched through a CAML query?
Sample demo:
const query = `<Where>
<Eq><FieldRef Name="File_x0020_Type"/>
<Value Type="Text">json</Value>
</Eq>
</...
3
votes
Download file from SharePoint Online with PowerShell
You can use this cmdlet : Get-PnPFile
Get-PnPFile -Url fileUrl -AsFile
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
file × 294sharepoint-online × 70
document-library × 66
rest × 31
2013 × 24
powershell × 23
folder × 21
sharepoint-server × 20
sharepoint-rest-api × 20
file-upload × 20
javascript × 17
development × 16
2010 × 15
sharepoint-enterprise × 14
document × 12
csom × 11
library × 11
download × 11
list × 10
permissions × 9
client-object-model × 9
delete × 9
flow × 7
versioning × 7
sharepoint-designer × 6