Files
MilkyShots/Butter/Dtos/Asset/AssetBrowseOptionsDto.cs
T
REDCODE b26163296f fix: allow empty path in asset browse options
ASP.NET infers [Required] for non-nullable reference-type query
parameters even when initialized with "", so an empty path= query failed
binding with 'The Path field is required.' Making the property nullable
removes the implicit required constraint; both browse endpoints already
normalize with Path ?? "".

Refs #180
2026-08-18 18:37:46 +02:00

20 lines
708 B
C#

namespace Butter.Dtos.Asset;
/// <summary>
/// Represents the parameters for browsing assets within a folder at a specific directory level.
/// </summary>
public class AssetBrowseOptionsDto : PagedSearchParametersDto {
/// <summary>
/// Gets or sets the root folder ID to browse within.
/// </summary>
public Guid FolderId { get; set; }
/// <summary>
/// Gets or sets the current path relative to the folder root (empty or null for root).
/// </summary>
public string? Path { get; set; }
/// <summary>
/// Gets or sets whether to only include assets not assigned to any album. Defaults to true.
/// </summary>
public bool UnlinkedOnly { get; set; } = true;
}