Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SPFile.SaveBinary method (Byte[], Boolean)

Saves the file in binary format based on the specified byte array and a Boolean value that specifies whether to check required fields.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
public void SaveBinary(
	byte[] file,
	bool checkRequiredFields
)

Parameters

file
Type: []

A byte array that contains the file.

checkRequiredFields
Type: System.Boolean

true to check required fields when saving the file; otherwise, false.

ExceptionCondition
SPException

An error occurred while saving the file.

This method calls SaveBinary(Stream, Boolean, Boolean, String, String, Stream, String) with new MemoryStream(file), checkRequiredFields, false, null , null , null , and an unused string.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.