Get URL of each video in SharePoint 2013 library with JavaScript

310 Views Asked by At

I need to get the URL of each video in a library with JavaScript (I don't know how many videos will be in the library). I also need to get specific information about each video, such as date created. How would I do this? I am using a Script Editor web part to execute the JavaScript.

2

There are 2 best solutions below

0
On

Rest call with the below url will get you what you looking for

/_api/web/lists/getbytitle('" + youlistname + "')/items?$select=*,FileRef/FileRef"
0
On

You could use rest API to get the information you wanted.

/_api/web/lists/GetByTitle('library title')/files

enter image description here

/_api/web/GetFolderByServerRelativeUrl('/sites/dev/Doc')/Files

enter image description here Get to know the SharePoint REST service