Search Results for

    Show / Hide Table of Contents
    View Source

    Class ApiMedia

    Represents media in the Delivery API.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Models.DeliveryApi
    Assembly: Umbraco.Core.dll
    Syntax
    public sealed class ApiMedia : IApiMedia

    Constructors

    View Source

    ApiMedia(Guid, string, string, string, string?, int?, int?, int?, IDictionary<string, object?>)

    Initializes a new instance of the ApiMedia class.

    Declaration
    public ApiMedia(Guid id, string name, string mediaType, string url, string? extension, int? width, int? height, int? bytes, IDictionary<string, object?> properties)
    Parameters
    Type Name Description
    Guid id

    The unique identifier of the media.

    string name

    The name of the media.

    string mediaType

    The media type alias.

    string url

    The URL of the media.

    string extension

    The file extension of the media.

    int? width

    The width of the media in pixels.

    int? height

    The height of the media in pixels.

    int? bytes

    The size of the media in bytes.

    IDictionary<string, object> properties

    The property values of the media.

    Properties

    View Source

    Bytes

    Gets the size of the media in bytes.

    Declaration
    public int? Bytes { get; }
    Property Value
    Type Description
    int?
    View Source

    Extension

    Gets the file extension of the media.

    Declaration
    public string? Extension { get; }
    Property Value
    Type Description
    string
    View Source

    Height

    Gets the height of the media in pixels, if applicable.

    Declaration
    public int? Height { get; }
    Property Value
    Type Description
    int?
    View Source

    Id

    Gets the unique identifier of the media.

    Declaration
    public Guid Id { get; }
    Property Value
    Type Description
    Guid
    View Source

    MediaType

    Gets the media type alias.

    Declaration
    public string MediaType { get; }
    Property Value
    Type Description
    string
    View Source

    Name

    Gets the name of the media.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    string
    View Source

    Properties

    Gets the property values of the media.

    Declaration
    public IDictionary<string, object?> Properties { get; }
    Property Value
    Type Description
    IDictionary<string, object>
    View Source

    Url

    Gets the URL of the media.

    Declaration
    public string Url { get; }
    Property Value
    Type Description
    string
    View Source

    Width

    Gets the width of the media in pixels, if applicable.

    Declaration
    public int? Width { get; }
    Property Value
    Type Description
    int?
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX