Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SaveBinaryDirect Method (ClientContext, String, Stream, String)

File.SaveBinaryDirect Method (ClientContext, String, Stream, String)

Uploads the specified file to a SharePoint site with the specified Etag 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,
	string etag
)

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.

etag
Type: System.String

A string that represents the SharePoint server’s Etag (entity tag).

Show:
© 2015 Microsoft