File.SaveBinaryDirect 方法 (ClientContext, String, Stream, Boolean)
上傳至 SharePoint 網站而不需要進行ExecuteQuery()方法通話的指定的檔案。
命名空間: Microsoft.SharePoint.Client
組件: Microsoft.SharePoint.Client (在 Microsoft.SharePoint.Client.dll 中)
語法
'宣告
Public Shared Sub SaveBinaryDirect ( _
context As ClientContext, _
serverRelativeUrl As String, _
stream As Stream, _
overwriteIfExists As Boolean _
)
'用途
Dim context As ClientContext
Dim serverRelativeUrl As String
Dim stream As Stream
Dim overwriteIfExists As BooleanFile.SaveBinaryDirect(context, serverRelativeUrl, _
stream, overwriteIfExists)
public static void SaveBinaryDirect(
ClientContext context,
string serverRelativeUrl,
Stream stream,
bool overwriteIfExists
)
參數
context
類型:Microsoft.SharePoint.Client.ClientContext表示 SharePoint 網站的伺服器內容ClientContext物件。
serverRelativeUrl
類型:System.String表示檔案的伺服器相對 URL 的字串。
stream
類型:System.IO.Stream表示檔案Stream物件。
overwriteIfExists
類型:System.Boolean指定是否已經存在,會覆寫檔案Boolean值。