Share via


VideoSet.UploadVideo method

Uploads the video file with the specified file name to the specified list.

Namespace:  Microsoft.SharePoint.Client.Video
Assembly:  Microsoft.SharePoint.Client.DocumentManagement (in Microsoft.SharePoint.Client.DocumentManagement.dll)

Syntax

'Declaration
Public Shared Function UploadVideo ( _
    context As ClientRuntimeContext, _
    list As List, _
    fileName As String, _
    file As Stream, _
    overwriteIfExists As Boolean, _
    parentFolderPath As String _
) As ClientResult(Of String)
'Usage
Dim context As ClientRuntimeContext
Dim list As List
Dim fileName As String
Dim file As Stream
Dim overwriteIfExists As Boolean
Dim parentFolderPath As String
Dim returnValue As ClientResult(Of String)

returnValue = VideoSet.UploadVideo(context, _
    list, fileName, file, overwriteIfExists, _
    parentFolderPath)
public static ClientResult<string> UploadVideo(
    ClientRuntimeContext context,
    List list,
    string fileName,
    Stream file,
    bool overwriteIfExists,
    string parentFolderPath
)

Parameters

  • fileName
    Type: System.String

    Name of the file, including the extension.

  • overwriteIfExists
    Type: System.Boolean

    Overwrites the existing file, if true. If false, the existing file will not be updated.

  • parentFolderPath
    Type: System.String

    Optional server-relative folder URL for the folder within the list to upload the file to. If null, file will be uploaded to the root folder.

Return value

Type: Microsoft.SharePoint.Client.ClientResult<String>
Absolute URL of the uploaded video file.

Exceptions

Exception Condition
ArgumentNullException

The videoPath parameter is a null reference (Nothing in Visual Basic).

ArgumentNullException

Video cannot be found at the specified path.

See also

Reference

VideoSet class

VideoSet members

Microsoft.SharePoint.Client.Video namespace