How can I get the file name of an image from a SharePoint 2013 Asset Library?
I am trying to write a JQuery/REST snippet to search a subset of images within the library, based on their other column values and display them. I would use FileLeafRef
in case of a Document Library, but I couldn't find an equivalent field in Asset Library.
I so far tried the following, neither returns file name: https:///crm/_api/Web/Lists/GetByTitle('Publication%20List')/items?select=File/Name&expand=File https:///crm/_api/Web/Lists/GetByTitle('Publication%20List')/items?select=FileLeafRef
I believe that yt's still
FileLeafRef
for an Asset Library. Any chance you could put the relevant code in your question?Here's the rest endpoint for
FileLeafRef
:Alternatively you could always use the
File Name
property:There is a typo in your example, in particular
$
symbol is missing for$select
and$expand
query options (more details).The following rest endpoints demonstrate how to retrieve file name from Assets library:
1) Using
FileLeafRef
property:2) Using
File/Name
property:3) Using
Folder/Files
property: