Export (0) Print
Expand All

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.

Show:
© 2014 Microsoft