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
- context
Type: Microsoft.SharePoint.Client.ClientRuntimeContext
list
Type: Microsoft.SharePoint.Client.ListList to upload the file to.
fileName
Type: System.StringName of the file, including the extension.
file
Type: System.IO.StreamFile stream to be uploaded.
overwriteIfExists
Type: System.BooleanOverwrites the existing file, if true. If false, the existing file will not be updated.
parentFolderPath
Type: System.StringOptional 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. |