Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

NopMediaDefaults.cs

using Nop.Core.Caching;

namespace Nop.Services.Media;

/// 
/// Represents default values related to media services
/// 
public static partial class NopMediaDefaults
{
    /// 
    /// Gets a multiple thumb directories length
    /// 
    public static int MultipleThumbDirectoriesLength => 3;

    /// 
    /// Gets a path to the image thumbs files
    /// 
    public static string ImageThumbsPath => @"images\thumbs";

    /// 
    /// Gets a default avatar file name
    /// 
    public static string DefaultAvatarFileName => "default-avatar.jpg";

    /// 
    /// Gets a default image file name
    /// 
    public static string DefaultImageFileName => "default-image.png";

    #region Caching defaults

    /// 
    /// Gets a key to cache whether thumb exists
    /// 
    /// 
    /// {0} : thumb file name
    /// 
    public static CacheKey ThumbExistsCacheKey => new("Nop.azure.thumb.exists.{0}", ThumbsExistsPrefix);

    /// 
    /// Gets a key pattern to clear cache
    /// 
    public static string ThumbsExistsPrefix => "Nop.azure.thumb.exists.";

    #endregion
}