Interface IMediaRepository
Represents a repository for IMedia entities.
Namespace: Umbraco.Cms.Core.Persistence.Repositories
Assembly: Umbraco.Core.dll
Syntax
public interface IMediaRepository : IContentRepository<int, IMedia>, IReadWriteQueryRepository<int, IMedia>, IReadRepository<int, IMedia>, IWriteRepository<IMedia>, IQueryRepository<IMedia>, IReadRepository<Guid, IMedia>, IRepository
Methods
View SourceGetMediaByPath(string)
Gets a media item by its file path.
Declaration
IMedia? GetMediaByPath(string mediaPath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | mediaPath | The file path of the media item. |
Returns
| Type | Description |
|---|---|
| IMedia | The media item if found; otherwise, |
RecycleBinSmells()
Returns true if there is any media in the recycle bin.
Declaration
bool RecycleBinSmells()
Returns
| Type | Description |
|---|---|
| bool |
|