共用方式為


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
)

參數

  • serverRelativeUrl
    類型:System.String

    表示檔案的伺服器相對 URL 的字串。

  • overwriteIfExists
    類型:System.Boolean

    指定是否已經存在,會覆寫檔案Boolean值。

請參閱

參照

File 類別

File 成員

SaveBinaryDirect 多載

Microsoft.SharePoint.Client 命名空間