VideoSet.UploadVideo method

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

Namespace:  Microsoft.Office.DocumentManagement.VideoSets
Assembly:  Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)

Syntax

'Declaration
Public Shared Function UploadVideo ( _
    list As SPList, _
    fileName As String, _
    file As Stream, _
    overwriteIfExists As Boolean, _
    parentFolderPath As String _
) As String
'Usage
Dim list As SPList
Dim fileName As String
Dim file As Stream
Dim overwriteIfExists As Boolean
Dim parentFolderPath As String
Dim returnValue As String

returnValue = VideoSet.UploadVideo(list, _
    fileName, file, overwriteIfExists, _
    parentFolderPath)
public static string UploadVideo(
    SPList 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: System.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.

Remarks

In order to get the full video experience, the video file should be uploaded to the document library that contains the video content type.

See also

Reference

VideoSet class

VideoSet members

Microsoft.Office.DocumentManagement.VideoSets namespace