This topic has not yet been rated - Rate this topic

File.SaveBinaryDirect method (ClientContext, String, Stream, Boolean)

Uploads the specified file to a SharePoint site without requiring an ExecuteQuery() method call.

Namespace:  Microsoft.SharePoint.Client
Assembly:  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)
public static void SaveBinaryDirect(
	ClientContext context,
	string serverRelativeUrl,
	Stream stream,
	bool overwriteIfExists
)

Parameters

context
Type: Microsoft.SharePoint.Client.ClientContext
A ClientContext object that represents the SharePoint site’s server context.
serverRelativeUrl
Type: System.String
A string that represents the server-relative URL of the file.
stream
Type: System.IO.Stream
A Stream object that represents the file.
overwriteIfExists
Type: System.Boolean
A Boolean value that specifies whether the file is overwritten if it already exists.
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.