SP.ListCollection.ensureSiteAssetsLibrary Method (sp.js)

Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages.

Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

SP.ListCollection.ensureSiteAssetsLibrary()

Return value

Type: SP.List

The list that is the default location for wiki page assets.

Remarks

If the list does not exist, this method creates and returns a list designated as a default asset location for images or other files, which the users upload to their wiki pages.

REST resource endpoint

See ListCollection resource for more information.

Endpoint URI structure

http://<sitecollection>/<site>/_api/web/lists/ensureSiteAssetsLibrary()

HTTP requests

This resource supports the following HTTP commands:

  • POST

POST syntax

POST http://<sitecollection>/<site>/_api/web/lists/ensureSiteAssetsLibrary()