共用方式為


SPFile.SaveBinary Method

Include Protected Members
Include Inherited Members

Saves the file in binary format.

Overload List

  Name Description
Public method SaveBinary([]) Saves the file in binary format based on the specified byte array.
Public method SaveBinary(Stream) Saves the file in binary format based on the specified stream.
Public method SaveBinary([], Boolean) Saves the file in binary format based on the specified byte array and a Boolean value that specifies whether to check required fields.
Public method SaveBinary(Stream, SPFileSaveBinaryParameters) Saves the file in binary format based on a stream that contains a file and an SPFileSaveBinaryParameters object with additional parameters.
Public method SaveBinary(Stream, Boolean) Saves the file in binary format based on the specified stream and a Boolean value that specifies whether to check required fields.
Public method SaveBinary(Stream, Boolean, Boolean, String, String, Stream, String) Saves the file and file format metadata based on the specified streams, strings, and optional ETag value.
Public method SaveBinary(Stream, Boolean, Boolean, String, String, Stream, Boolean, String) Saves the file and file format metadata based on the specified streams, strings, Boolean value, and optional ETag value.

Top

Remarks

If versioning is enabled for the document library that contains the file, calling the SaveBinary method creates an SPFileVersion object.

See Also

Reference

SPFile Class

SPFile Members

Microsoft.SharePoint Namespace