When I upload a video to Asset Library
, it automatically creates a folder and inside that folder the video is uploaded
I try to access this video by U2U CAML Query Builder but it's not working
how to get the video like a SharePoint file
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityAssume Wildlife_512kb.mp4
file has been uploaded into Assets
library titled Assets
, then the following example demonstrates how to retrieve file url:
var listTitle = "Assets";
var videoFileName = "Wildlife_512kb.mp4";
var list = ctx.Web.Lists.GetByTitle(listTitle);
ctx.Load(list,l => l.RootFolder);
ctx.ExecuteQuery();
var videoSetName = Path.GetFileNameWithoutExtension(videoFileName);
var videoFileUrl = list.RootFolder.ServerRelativeUrl + "/" + videoSetName + "/" + videoFileName;
Console.WriteLine(videoFileUrl);
According to Enhanced Video Experience in SharePoint 2013:
Videos are organized in a manner similar to document sets, which is a group of related documents that can be created in a single step and managed as one entity. To learn more about document sets, see Introduction to document sets. SharePoint creates a stub (think of it as a folder) to hold a video and all the related contents, such as user-defined properties, thumbnails, video renditions, and other documents related to the video. When you upload a video file, SharePoint automatically creates this stub for that video. You can imagine the video set to be the encapsulation of everything related to that video.
Suppose Wildlife_512kb.mp4
file have to be uploaded into Assets library.
Then the following folder structure with content will be generated after file uploading into Assets library
The actual video file will be stored under:
<ListUrl>/<VideoSet>/<FileName>
where VideoSet
(folder container) name will be set to the file name without extension.