Class ByPathMediaApiController
Namespace: Umbraco.Cms.Api.Delivery.Controllers
Assembly: Umbraco.Cms.Api.Delivery.dll
Syntax
public class ByPathMediaApiController : MediaApiControllerBase
Constructors
View SourceByPathMediaApiController(IPublishedSnapshotAccessor, IApiMediaWithCropsResponseBuilder, IApiMediaQueryService)
Declaration
public ByPathMediaApiController(IPublishedSnapshotAccessor publishedSnapshotAccessor, IApiMediaWithCropsResponseBuilder apiMediaWithCropsResponseBuilder, IApiMediaQueryService apiMediaQueryService)
Parameters
Type | Name | Description |
---|---|---|
IPublishedSnapshotAccessor | publishedSnapshotAccessor | |
IApiMediaWithCropsResponseBuilder | apiMediaWithCropsResponseBuilder | |
IApiMediaQueryService | apiMediaQueryService |
Methods
View SourceByPath(String)
Gets a media item by its path.
Declaration
public async Task<IActionResult> ByPath(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path of the media item. |
Returns
Type | Description |
---|---|
Task<IActionResult> | The media item or not found result. |